Refactored demo section to single app layout.
This commit is contained in:
parent
b3635cf64d
commit
4bd244f4e5
337 changed files with 1630 additions and 1883 deletions
|
|
@ -0,0 +1,17 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.menu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.forwardfire.vasc.demo.tech.domain.menu.model.VascMenu;
|
||||
import net.forwardfire.vasc.demo.tech.domain.menu.model.VascMenuGroup;
|
||||
import net.forwardfire.vasc.demo.tech.domain.menu.model.VascMenuWeb;
|
||||
import net.forwardfire.vasc.demo.tech.domain.menu.model.VascMenuWebType;
|
||||
|
||||
public interface VascMenuController {
|
||||
|
||||
List<VascMenuWeb> getFilteredMenuWeb(VascMenuWebType type);
|
||||
|
||||
List<VascMenuGroup> getFilteredMenuGroup();
|
||||
|
||||
List<VascMenu> getFilteredMenu(String groupId);
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.menu;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
@Local
|
||||
public interface VascMenuControllerLocal extends VascMenuController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.menu;
|
||||
|
||||
import javax.ejb.Remote;
|
||||
|
||||
@Remote
|
||||
public interface VascMenuControllerRemote extends VascMenuController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Copyright 2009-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.demo.tech.domain.menu.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* VascMenu stores menu item information.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 19, 2012
|
||||
*/
|
||||
public class VascMenu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5087600835051760512L;
|
||||
private String vascEntryId = null;
|
||||
private String titleKey = null;
|
||||
private String vascGroupId = null;
|
||||
/**
|
||||
* @return the vascEntryId
|
||||
*/
|
||||
public String getVascEntryId() {
|
||||
return vascEntryId;
|
||||
}
|
||||
/**
|
||||
* @param vascEntryId the vascEntryId to set
|
||||
*/
|
||||
public void setVascEntryId(String vascEntryId) {
|
||||
this.vascEntryId = vascEntryId;
|
||||
}
|
||||
/**
|
||||
* @return the titleKey
|
||||
*/
|
||||
public String getTitleKey() {
|
||||
return titleKey;
|
||||
}
|
||||
/**
|
||||
* @param titleKey the titleKey to set
|
||||
*/
|
||||
public void setTitleKey(String titleKey) {
|
||||
this.titleKey = titleKey;
|
||||
}
|
||||
/**
|
||||
* @return the vascGroupId
|
||||
*/
|
||||
public String getVascGroupId() {
|
||||
return vascGroupId;
|
||||
}
|
||||
/**
|
||||
* @param vascGroupId the vascGroupId to set
|
||||
*/
|
||||
public void setVascGroupId(String vascGroupId) {
|
||||
this.vascGroupId = vascGroupId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2009-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.demo.tech.domain.menu.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* VascMenuGroup stores menu header item information.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Nov 21, 2012
|
||||
*/
|
||||
public class VascMenuGroup implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -9154803561816570868L;
|
||||
private String id = null;
|
||||
private String titleKey = null;
|
||||
private List<VascMenu> menus = null;
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the titleKey
|
||||
*/
|
||||
public String getTitleKey() {
|
||||
return titleKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param titleKey the titleKey to set
|
||||
*/
|
||||
public void setTitleKey(String titleKey) {
|
||||
this.titleKey = titleKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the menus
|
||||
*/
|
||||
public List<VascMenu> getMenus() {
|
||||
return menus;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param menus the menus to set
|
||||
*/
|
||||
public void setMenus(List<VascMenu> menus) {
|
||||
this.menus = menus;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* Copyright 2009-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.demo.tech.domain.menu.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* VascMenu stores menu item information.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 19, 2012
|
||||
*/
|
||||
public class VascMenuWeb implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4650021226959950898L;
|
||||
private Integer id = null;
|
||||
private String href = null;
|
||||
private String title = null;
|
||||
private String target = null;
|
||||
private Boolean active = null;
|
||||
private String roles = null;
|
||||
private Integer menuOrder = null;
|
||||
private VascMenuWebType menuType = null;
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the href
|
||||
*/
|
||||
public String getHref() {
|
||||
return href;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param href the href to set
|
||||
*/
|
||||
public void setHref(String href) {
|
||||
this.href = href;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the title
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param title the title to set
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the target
|
||||
*/
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param target the target to set
|
||||
*/
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the active
|
||||
*/
|
||||
public Boolean getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param active the active to set
|
||||
*/
|
||||
public void setActive(Boolean active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the roles
|
||||
*/
|
||||
public String getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param roles the roles to set
|
||||
*/
|
||||
public void setRoles(String roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the menuOrder
|
||||
*/
|
||||
public Integer getMenuOrder() {
|
||||
return menuOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param menuOrder the menuOrder to set
|
||||
*/
|
||||
public void setMenuOrder(Integer menuOrder) {
|
||||
this.menuOrder = menuOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the menuType
|
||||
*/
|
||||
public VascMenuWebType getMenuType() {
|
||||
return menuType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param menuType the menuType to set
|
||||
*/
|
||||
public void setMenuType(VascMenuWebType menuType) {
|
||||
this.menuType = menuType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright 2009-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.demo.tech.domain.menu.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Comparator;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* VascMenuComparator orders the menu items.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 19, 2012
|
||||
*/
|
||||
public class VascMenuWebComparator implements Serializable,Comparator<VascMenuWeb> {
|
||||
|
||||
private static final long serialVersionUID = 386631856823832371L;
|
||||
|
||||
public int compare(VascMenuWeb m1, VascMenuWeb m2) {
|
||||
if (m1.getMenuOrder()==null) {
|
||||
return 1;
|
||||
}
|
||||
if (m2.getMenuOrder()==null) {
|
||||
return -1;
|
||||
}
|
||||
return m1.getMenuOrder().compareTo(m2.getMenuOrder());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright 2009-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.demo.tech.domain.menu.model;
|
||||
|
||||
/**
|
||||
* VascMenuType defines all menu lists on page.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 26, 2012
|
||||
*/
|
||||
public enum VascMenuWebType {
|
||||
|
||||
BAR_LEFT,
|
||||
BAR_RIGHT,
|
||||
BAR_BOTTOM,
|
||||
|
||||
MAIN_MENU_0,
|
||||
MAIN_MENU_1,
|
||||
MAIN_MENU_2,
|
||||
|
||||
PAGE_INDEX,
|
||||
PAGE_USER_LEFT,
|
||||
PAGE_USER_RIGHT,
|
||||
PAGE_ADMIN,
|
||||
PAGE_HELP
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author willemc
|
||||
*
|
||||
*/
|
||||
package net.forwardfire.vasc.demo.tech.domain.menu.model;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author willemc
|
||||
*
|
||||
*/
|
||||
package net.forwardfire.vasc.demo.tech.domain.menu;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
abstract public class AbstractPetStoreEntity {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascDefaultValue;
|
||||
import net.forwardfire.vasc.annotations.VascDisplayName;
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldOrder;
|
||||
import net.forwardfire.vasc.annotations.VascFieldType;
|
||||
import net.forwardfire.vasc.annotations.VascI18n;
|
||||
import net.forwardfire.vasc.annotations.VascPrimaryKey;
|
||||
import net.forwardfire.vasc.annotations.VascRoles;
|
||||
import net.forwardfire.vasc.annotations.VascStyle;
|
||||
import net.forwardfire.vasc.validators.VascObjectNotNull;
|
||||
import net.forwardfire.vasc.validators.VascStringLength;
|
||||
|
||||
|
||||
abstract public class AbstractPetStoreFieldTemplates {
|
||||
|
||||
|
||||
/**
|
||||
* Template for field ids.
|
||||
*/
|
||||
@VascPrimaryKey
|
||||
@VascI18n(name="generic.id.labelText",description="generic.id.toolTipText")
|
||||
@VascStyle(sizeList=50)
|
||||
@VascField(create=false,editReadOnly=true)
|
||||
@VascFieldOrder(order=0)
|
||||
abstract public Integer getId();
|
||||
|
||||
/**
|
||||
* Template for field names.
|
||||
*/
|
||||
@VascDisplayName
|
||||
@VascI18n(name="generic.name.labelText",description="generic.name.toolTipText")
|
||||
@VascObjectNotNull
|
||||
@VascStringLength(min=4,max=128)
|
||||
@VascStyle(sizeList=250,sizeEdit=40)
|
||||
@VascFieldOrder(order=1)
|
||||
abstract public String getName();
|
||||
|
||||
/**
|
||||
* Template for description field names.
|
||||
*/
|
||||
@VascI18n(name="generic.description.labelText",description="generic.description.toolTipText")
|
||||
@VascFieldType(type="TextAreaField",properties={"editor.columns=40","editor.rows=5"})
|
||||
@VascDefaultValue(value="")
|
||||
@VascField(list=false)
|
||||
@VascStringLength(max=4096)
|
||||
@VascObjectNotNull
|
||||
@VascFieldOrder(order=2)
|
||||
abstract public String getDescription();
|
||||
|
||||
/**
|
||||
* Template for active field.
|
||||
*/
|
||||
@VascI18n(name="generic.active.labelText",description="generic.active.toolTipText")
|
||||
@VascDefaultValue(value="true")
|
||||
@VascObjectNotNull
|
||||
@VascFieldOrder(order=4)
|
||||
@VascField(create=false)
|
||||
@VascRoles(rolesEdit="datafeedsPowerRole",rolesList="datafeedsPowerRole")
|
||||
abstract public Boolean getActive();
|
||||
|
||||
/**
|
||||
* Template for modified date.
|
||||
*/
|
||||
@VascI18n(name="generic.modifiedDate.labelText",description="generic.modifiedDate.toolTipText")
|
||||
@VascField(create=false,editReadOnly=true,list=false)
|
||||
@VascObjectNotNull
|
||||
abstract public Date getModifiedDate();
|
||||
|
||||
/**
|
||||
* Template for created date.
|
||||
*/
|
||||
@VascI18n(name="generic.createdDate.labelText",description="generic.createdDate.toolTipText")
|
||||
@VascField(create=false,editReadOnly=true,list=false)
|
||||
@VascObjectNotNull
|
||||
abstract public Date getCreatedDate();
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
|
||||
@Entity
|
||||
@Table(name="category",schema="petstore")
|
||||
public class Category extends AbstractPetStoreEntity{
|
||||
|
||||
private Integer id = null;
|
||||
private String name = null;
|
||||
private String description = null;
|
||||
private String iconUrl = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Column(name="icon_url",nullable=true)
|
||||
@VascField(list=false)
|
||||
public String getIconUrl() {
|
||||
return iconUrl;
|
||||
}
|
||||
public void setIconUrl(String iconUrl) {
|
||||
this.iconUrl = iconUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
public class CategoryProduct extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private Category category = null;
|
||||
private String name = null;
|
||||
private String description = null;
|
||||
private String iconUrl = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="category_id",nullable=false)
|
||||
@VascModelReference
|
||||
public Category getCategory() {
|
||||
return category;
|
||||
}
|
||||
public void setCategory(Category category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Column(name="icon_url",nullable=true)
|
||||
@VascField(list=false)
|
||||
public String getIconUrl() {
|
||||
return iconUrl;
|
||||
}
|
||||
public void setIconUrl(String iconUrl) {
|
||||
this.iconUrl = iconUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
public class Item extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private CategoryProduct categoryProduct = null;
|
||||
private ItemSupplier itemSupplier = null;
|
||||
private Float price = null;
|
||||
private Integer status = null;
|
||||
private String name = null;
|
||||
private String description = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="category_product_id",nullable=false)
|
||||
@VascModelReference
|
||||
public CategoryProduct getCategoryProduct() {
|
||||
return categoryProduct;
|
||||
}
|
||||
public void setCategoryProduct(CategoryProduct categoryProduct) {
|
||||
this.categoryProduct = categoryProduct;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="item_supplier_id",nullable=false)
|
||||
@VascModelReference
|
||||
public ItemSupplier getItemSupplier() {
|
||||
return itemSupplier;
|
||||
}
|
||||
public void setItemSupplier(ItemSupplier itemSupplier) {
|
||||
this.itemSupplier = itemSupplier;
|
||||
}
|
||||
|
||||
@Column(name="price",nullable=false)
|
||||
public Float getPrice() {
|
||||
return price;
|
||||
}
|
||||
public void setPrice(Float price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
@Column(name="status",nullable=false)
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
public class ItemInventory extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private Item item = null;
|
||||
private Integer inventoryCount = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="item_id",nullable=false)
|
||||
@VascModelReference
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
public void setItem(Item item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
@Column(name="inventory_count",nullable=false)
|
||||
public Integer getInventoryCount() {
|
||||
return inventoryCount;
|
||||
}
|
||||
public void setInventoryCount(Integer inventoryCount) {
|
||||
this.inventoryCount = inventoryCount;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
|
||||
@Entity
|
||||
public class ItemSupplier extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private String name = null;
|
||||
private String description = null;
|
||||
private String website = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Column(name="website",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getWebsite() {
|
||||
return website;
|
||||
}
|
||||
public void setWebsite(String website) {
|
||||
this.website = website;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
public class Order extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private UserAccount userAccount = null;
|
||||
private Date orderDate = null;
|
||||
private Date shipDate = null;
|
||||
|
||||
private String shipAddr1 = null;
|
||||
private String shipAddr2 = null;
|
||||
private String shipCity = null;
|
||||
private String shipZipCode = null;
|
||||
private String shipCountry = null;
|
||||
|
||||
private String billAddr1 = null;
|
||||
private String billAddr2 = null;
|
||||
private String billCity = null;
|
||||
private String billZipCode = null;
|
||||
private String billCountry = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="user_account_id",nullable=false)
|
||||
@VascModelReference
|
||||
public UserAccount getUserAccount() {
|
||||
return userAccount;
|
||||
}
|
||||
public void setUserAccount(UserAccount userAccount) {
|
||||
this.userAccount = userAccount;
|
||||
}
|
||||
|
||||
@Column(name="order_date",nullable=false)
|
||||
public Date getOrderDate() {
|
||||
return orderDate;
|
||||
}
|
||||
public void setOrderDate(Date orderDate) {
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
||||
@Column(name="ship_date",nullable=false)
|
||||
@VascField(list=false)
|
||||
public Date getShipDate() {
|
||||
return shipDate;
|
||||
}
|
||||
public void setShipDate(Date shipDate) {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
|
||||
@Column(name="ship_addr1",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getShipAddr1() {
|
||||
return shipAddr1;
|
||||
}
|
||||
public void setShipAddr1(String shipAddr1) {
|
||||
this.shipAddr1 = shipAddr1;
|
||||
}
|
||||
|
||||
@Column(name="ship_addr2",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getShipAddr2() {
|
||||
return shipAddr2;
|
||||
}
|
||||
public void setShipAddr2(String shipAddr2) {
|
||||
this.shipAddr2 = shipAddr2;
|
||||
}
|
||||
|
||||
@Column(name="ship_city",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getShipCity() {
|
||||
return shipCity;
|
||||
}
|
||||
public void setShipCity(String shipCity) {
|
||||
this.shipCity = shipCity;
|
||||
}
|
||||
|
||||
@Column(name="ship_zipcode",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getShipZipCode() {
|
||||
return shipZipCode;
|
||||
}
|
||||
public void setShipZipCode(String shipZipCode) {
|
||||
this.shipZipCode = shipZipCode;
|
||||
}
|
||||
|
||||
@Column(name="ship_country",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getShipCountry() {
|
||||
return shipCountry;
|
||||
}
|
||||
public void setShipCountry(String shipCountry) {
|
||||
this.shipCountry = shipCountry;
|
||||
}
|
||||
|
||||
@Column(name="bill_addr1",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getBillAddr1() {
|
||||
return billAddr1;
|
||||
}
|
||||
public void setBillAddr1(String billAddr1) {
|
||||
this.billAddr1 = billAddr1;
|
||||
}
|
||||
|
||||
@Column(name="bill_addr2",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getBillAddr2() {
|
||||
return billAddr2;
|
||||
}
|
||||
public void setBillAddr2(String billAddr2) {
|
||||
this.billAddr2 = billAddr2;
|
||||
}
|
||||
|
||||
@Column(name="bill_city",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getBillCity() {
|
||||
return billCity;
|
||||
}
|
||||
public void setBillCity(String billCity) {
|
||||
this.billCity = billCity;
|
||||
}
|
||||
|
||||
@Column(name="bill_zipcode",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getBillZipCode() {
|
||||
return billZipCode;
|
||||
}
|
||||
public void setBillZipCode(String billZipCode) {
|
||||
this.billZipCode = billZipCode;
|
||||
}
|
||||
|
||||
@Column(name="bill_country",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getBillCountry() {
|
||||
return billCountry;
|
||||
}
|
||||
public void setBillCountry(String billCountry) {
|
||||
this.billCountry = billCountry;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
public class OrderLine extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private Order order = null;
|
||||
private Integer lineNumber = null;
|
||||
private Item item = null;
|
||||
private Integer quantity = null;
|
||||
private Float itemPrice = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="order_id",nullable=false)
|
||||
@VascModelReference
|
||||
public Order getOrder() {
|
||||
return order;
|
||||
}
|
||||
public void setOrder(Order order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
@Column(name="line_number",nullable=false)
|
||||
@VascField(list=false)
|
||||
public Integer getLineNumber() {
|
||||
return lineNumber;
|
||||
}
|
||||
public void setLineNumber(Integer lineNumber) {
|
||||
this.lineNumber = lineNumber;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="item_id",nullable=false)
|
||||
@VascModelReference
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
public void setItem(Item item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
@Column(name="quantity",nullable=false)
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
@Column(name="item_price",nullable=false)
|
||||
public Float getItemPrice() {
|
||||
return itemPrice;
|
||||
}
|
||||
public void setItemPrice(Float itemPrice) {
|
||||
this.itemPrice = itemPrice;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
|
||||
@Entity
|
||||
public class OrderStatus extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private String type = null;
|
||||
private Boolean active = null;
|
||||
private String name = null;
|
||||
private String description = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name="type",nullable=false)
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Column(name="active",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Boolean getActive() {
|
||||
return active;
|
||||
}
|
||||
public void setActive(Boolean active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascField(list=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
|
||||
@Entity
|
||||
public class UserAccount extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private String email = null;
|
||||
private String firstName = null;
|
||||
private String lastName = null;
|
||||
private String streetName = null;
|
||||
private String streetNumber = null;
|
||||
private String zipCode = null;
|
||||
private String country = null;
|
||||
private String countryState = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name="email",nullable=false)
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
@Column(name="first_name",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
@Column(name="last_name",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
@Column(name="street_name",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getStreetName() {
|
||||
return streetName;
|
||||
}
|
||||
public void setStreetName(String streetName) {
|
||||
this.streetName = streetName;
|
||||
}
|
||||
|
||||
@Column(name="street_number",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getStreetNumber() {
|
||||
return streetNumber;
|
||||
}
|
||||
public void setStreetNumber(String streetNumber) {
|
||||
this.streetNumber = streetNumber;
|
||||
}
|
||||
|
||||
@Column(name="zip_code",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
@Column(name="country",nullable=false)
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
@Column(name="country_state",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getCountryState() {
|
||||
return countryState;
|
||||
}
|
||||
public void setCountryState(String countryState) {
|
||||
this.countryState = countryState;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
public class UserCredential extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private UserAccount userAccount = null;
|
||||
private String password = null;
|
||||
private String secretQuestion0 = null;
|
||||
private String secretAnswer0 = null;
|
||||
private String secretQuestion1 = null;
|
||||
private String secretAnswer1 = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="user_account_id",nullable=false)
|
||||
@VascModelReference
|
||||
public UserAccount getUserAccount() {
|
||||
return userAccount;
|
||||
}
|
||||
public void setUserAccount(UserAccount userAccount) {
|
||||
this.userAccount = userAccount;
|
||||
}
|
||||
|
||||
@Column(name="password",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Column(name="secret_question0",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getSecretQuestion0() {
|
||||
return secretQuestion0;
|
||||
}
|
||||
public void setSecretQuestion0(String secretQuestion0) {
|
||||
this.secretQuestion0 = secretQuestion0;
|
||||
}
|
||||
|
||||
@Column(name="secret_answer0",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getSecretAnswer0() {
|
||||
return secretAnswer0;
|
||||
}
|
||||
public void setSecretAnswer0(String secretAnswer0) {
|
||||
this.secretAnswer0 = secretAnswer0;
|
||||
}
|
||||
|
||||
@Column(name="secret_question1",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getSecretQuestion1() {
|
||||
return secretQuestion1;
|
||||
}
|
||||
public void setSecretQuestion1(String secretQuestion1) {
|
||||
this.secretQuestion1 = secretQuestion1;
|
||||
}
|
||||
|
||||
@Column(name="secret_answer1",nullable=false)
|
||||
@VascField(list=false)
|
||||
public String getSecretAnswer1() {
|
||||
return secretAnswer1;
|
||||
}
|
||||
public void setSecretAnswer1(String secretAnswer1) {
|
||||
this.secretAnswer1 = secretAnswer1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascDefaultValue;
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
public class UserProfile extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private String signUpIp = null;
|
||||
private String signUpAgent = null;
|
||||
private String locale = null;
|
||||
private UserAccount userAccount = null;
|
||||
private Category userCategory = null;
|
||||
|
||||
@Id
|
||||
@Column(name="id",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name="signup_ip",nullable=false)
|
||||
@VascField(list=false)
|
||||
@VascDefaultValue(value="0.0.0.0")
|
||||
public String getSignUpIp() {
|
||||
return signUpIp;
|
||||
}
|
||||
public void setSignUpIp(String signUpIp) {
|
||||
this.signUpIp = signUpIp;
|
||||
}
|
||||
|
||||
@Column(name="signup_agent",nullable=false)
|
||||
@VascField(list=false)
|
||||
@VascDefaultValue(value="No-Agent")
|
||||
public String getSignUpAgent() {
|
||||
return signUpAgent;
|
||||
}
|
||||
public void setSignUpAgent(String signUpAgent) {
|
||||
this.signUpAgent = signUpAgent;
|
||||
}
|
||||
|
||||
@Column(name="locale",nullable=false)
|
||||
@VascField(list=false)
|
||||
@VascDefaultValue(value="nl_NL")
|
||||
public String getLocale() {
|
||||
return locale;
|
||||
}
|
||||
public void setLocale(String locale) {
|
||||
this.locale = locale;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="user_account_id",nullable=false)
|
||||
@VascModelReference
|
||||
public UserAccount getUserAccount() {
|
||||
return userAccount;
|
||||
}
|
||||
public void setUserAccount(UserAccount userAccount) {
|
||||
this.userAccount = userAccount;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="user_category_id",nullable=false)
|
||||
@VascModelReference
|
||||
public Category getUserCategory() {
|
||||
return userCategory;
|
||||
}
|
||||
public void setUserCategory(Category userCategory) {
|
||||
this.userCategory = userCategory;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author willemc
|
||||
*
|
||||
*/
|
||||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.user;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ClientUserController {
|
||||
|
||||
String doClientLogin();
|
||||
|
||||
Map<String,String> getResourceBundle(Locale locale);
|
||||
|
||||
List<Locale> getResourceBundleLocales();
|
||||
|
||||
/*
|
||||
void doClientLogout();
|
||||
|
||||
User getUser() throws Exception;
|
||||
|
||||
List<RightRole> getClientRoles() throws Exception;
|
||||
*/
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.user;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
@Local
|
||||
public interface ClientUserControllerLocal extends ClientUserController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.user;
|
||||
|
||||
import javax.ejb.Remote;
|
||||
|
||||
@Remote
|
||||
public interface ClientUserControllerRemote extends ClientUserController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author willemc
|
||||
*
|
||||
*/
|
||||
package net.forwardfire.vasc.demo.tech.domain.user;
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0"?>
|
||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
||||
version="1.0">
|
||||
<persistence-unit name="petstore_pu" transaction-type="JTA" >
|
||||
<jta-data-source>java:demo_petstore_dba</jta-data-source>
|
||||
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.Category</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.CategoryProduct</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.Item</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.ItemInventory</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.ItemSupplier</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.Order</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.OrderLine</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.OrderStatus</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.UserAccount</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.UserCredential</class>
|
||||
<class>net.forwardfire.vasc.demo.tech.domain.petstore.model.UserProfile</class>
|
||||
|
||||
<properties>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
|
||||
<property name="hibernate.max_fetch_depth" value="3"/>
|
||||
<!-- Print SQL to stdout. -->
|
||||
<property name="hibernate.show_sql" value="false"/>
|
||||
<property name="hibernate.format_sql" value="true"/>
|
||||
</properties>
|
||||
|
||||
</persistence-unit>
|
||||
|
||||
</persistence>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||
<properties>
|
||||
<comment>
|
||||
Files to load
|
||||
</comment>
|
||||
<entry key="persistenceUnit">java:/df_ui_datafeeds_pu</entry>
|
||||
<entry key="xpqlController">df-ui/ejb/xpqlQueryManager/local</entry>
|
||||
<entry key="i18nBundle">demo/petstore/resources/i18n/PetstoreBundle_en</entry>
|
||||
<entry key="load.0">demo/petstore/resources/vasc/petstore.xml</entry>
|
||||
</properties>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||
<properties>
|
||||
<comment>
|
||||
Files to load
|
||||
</comment>
|
||||
<entry key="persistenceUnit">java:/petstore_pu</entry>
|
||||
<entry key="load.0">demo/petstore/resources/xpql/petstore.xml</entry>
|
||||
</properties>
|
||||
Loading…
Add table
Add a link
Reference in a new issue