removed some magic from jpa.
This commit is contained in:
parent
30418cad13
commit
e643a69308
|
@ -90,7 +90,6 @@ public interface VascBackend<DATA_OBJECT extends Serializable> {
|
|||
long doRecordMoveUpById(VascBackendState state,Object primaryId) throws VascBackendException;
|
||||
long doRecordMoveDownById(VascBackendState state,Object primaryId) throws VascBackendException;
|
||||
|
||||
|
||||
boolean hasPageSummary();
|
||||
|
||||
boolean hasTotalSummary();
|
||||
|
|
|
@ -232,9 +232,11 @@ public enum VascTechDemoStartup {
|
|||
serverConfigService.stop();
|
||||
tomcatService.stop();
|
||||
databaseService.stop();
|
||||
swingGuiService.stop();
|
||||
|
||||
long stopTime = System.currentTimeMillis();
|
||||
logger.info("VascTechDemo shutdown in "+(stopTime-startTime)+" ms.");
|
||||
|
||||
swingGuiService.stop();// fixme kills logging
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
|
|
|
@ -115,13 +115,13 @@ public class ServerGuiApplication extends SingleFrameApplication {
|
|||
updateInfoTask.run=false; // app will exit so stop update
|
||||
return true;
|
||||
} else {
|
||||
logger.finer("Closing application window.");
|
||||
logger.info("Closing application window.");
|
||||
updateInfoTask.doUpdate=false; // close window
|
||||
ServerGuiApplication.getInstance().getMainFrame().setVisible(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void willExit(EventObject event) {
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public class ServerGuiApplication extends SingleFrameApplication {
|
|||
static public ServerGuiApplication getInstance() {
|
||||
return getInstance(ServerGuiApplication.class);
|
||||
}
|
||||
|
||||
|
||||
private void startSystemTray() {
|
||||
if (!SystemTray.isSupported()) {
|
||||
return;
|
||||
|
@ -158,7 +158,7 @@ public class ServerGuiApplication extends SingleFrameApplication {
|
|||
final PopupMenu popup = new PopupMenu();
|
||||
final TrayIcon trayIcon = new TrayIcon(createImageIcon("/net/forwardfire/vasc/demo/server/ui/resources/tray-icon.png", "tray icon").getImage());
|
||||
final SystemTray tray = SystemTray.getSystemTray();
|
||||
|
||||
|
||||
MenuItem aboutItem = new MenuItem("About");
|
||||
aboutItem.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
|
@ -185,7 +185,6 @@ public class ServerGuiApplication extends SingleFrameApplication {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
popup.add(exitItem);
|
||||
popup.addSeparator();
|
||||
popup.add(aboutItem);
|
||||
|
@ -196,7 +195,7 @@ public class ServerGuiApplication extends SingleFrameApplication {
|
|||
try {
|
||||
tray.add(trayIcon);
|
||||
} catch (AWTException e) {
|
||||
System.out.println("TrayIcon could not be added.");
|
||||
logger.warning("TrayIcon could not be added.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,7 +211,7 @@ public class ServerGuiApplication extends SingleFrameApplication {
|
|||
UIManager.put("TabbedPane.font", Font.decode("SansSerif-BOLD-12"));
|
||||
UIManager.put("TitledBorder.font", Font.decode("SansSerif-BOLD-16"));
|
||||
UIManager.put("FireDial.font", Font.decode("SansSerif-9"));
|
||||
|
||||
|
||||
String colorName = "laf-colors";
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if (cl==null) {
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package net.forwardfire.vasc.demo.tech.domain.petstore.model;
|
||||
|
||||
abstract public class AbstractPetStoreEntity {
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractPetStoreEntity implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
@Id
|
||||
@Column(name=AbstractPetStoreDBColumn.ID,nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,40 +15,39 @@ import net.forwardfire.vasc.validators.VascObjectNotNull;
|
|||
import net.forwardfire.vasc.validators.VascStringLength;
|
||||
|
||||
|
||||
abstract public class AbstractPetStoreFieldTemplates {
|
||||
|
||||
abstract public class AbstractPetStoreVascFieldTemplate {
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
||||
@VascI18n(name="generic.id.labelText",description="generic.id.toolTipText")
|
||||
@VascStyle(sizeList=50)
|
||||
@VascField(create=false,editReadOnly=true)
|
||||
@VascFieldOrder(order=0)
|
||||
abstract public Long 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)
|
||||
@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)
|
||||
@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();
|
||||
|
||||
/**
|
|
@ -2,45 +2,35 @@ 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{
|
||||
@Table(name=AbstractPetStoreDBTable.CATEGORY,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
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)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
@ -50,6 +40,7 @@ public class Category extends AbstractPetStoreEntity{
|
|||
public String getIconUrl() {
|
||||
return iconUrl;
|
||||
}
|
||||
|
||||
public void setIconUrl(String iconUrl) {
|
||||
this.iconUrl = iconUrl;
|
||||
}
|
||||
|
|
|
@ -3,33 +3,23 @@ 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 javax.persistence.Table;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
@Table(name=AbstractPetStoreDBTable.CATEGORY_PRODUCT,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
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
|
||||
|
@ -41,7 +31,7 @@ public class CategoryProduct extends AbstractPetStoreEntity {
|
|||
}
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -50,7 +40,7 @@ public class CategoryProduct extends AbstractPetStoreEntity {
|
|||
}
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,15 @@ import javax.persistence.FetchType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
@Table(name=AbstractPetStoreDBTable.ITEM,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
public class Item extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
|
||||
private CategoryProduct categoryProduct = null;
|
||||
private ItemSupplier itemSupplier = null;
|
||||
private Float price = null;
|
||||
|
@ -21,16 +22,6 @@ public class Item extends AbstractPetStoreEntity {
|
|||
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
|
||||
|
@ -69,7 +60,7 @@ public class Item extends AbstractPetStoreEntity {
|
|||
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -79,7 +70,7 @@ public class Item extends AbstractPetStoreEntity {
|
|||
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
|
|
@ -6,27 +6,18 @@ import javax.persistence.FetchType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
@Table(name=AbstractPetStoreDBTable.ITEM_INVENTORY,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
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
|
||||
|
|
|
@ -3,30 +3,21 @@ 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=AbstractPetStoreDBTable.ITEM_SUPPLIER,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
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)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -35,7 +26,7 @@ public class ItemSupplier extends AbstractPetStoreEntity {
|
|||
}
|
||||
|
||||
@Column(name="description",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
|
|
@ -5,18 +5,17 @@ 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 javax.persistence.Table;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
@Table(name=AbstractPetStoreDBTable.ORDER,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
public class Order extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
|
||||
private UserAccount userAccount = null;
|
||||
private Date orderDate = null;
|
||||
private Date shipDate = null;
|
||||
|
@ -33,22 +32,13 @@ public class Order extends AbstractPetStoreEntity {
|
|||
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
|
||||
@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;
|
||||
}
|
||||
|
@ -57,6 +47,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public Date getOrderDate() {
|
||||
return orderDate;
|
||||
}
|
||||
|
||||
public void setOrderDate(Date orderDate) {
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
@ -66,6 +57,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public Date getShipDate() {
|
||||
return shipDate;
|
||||
}
|
||||
|
||||
public void setShipDate(Date shipDate) {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
|
@ -75,6 +67,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getShipAddr1() {
|
||||
return shipAddr1;
|
||||
}
|
||||
|
||||
public void setShipAddr1(String shipAddr1) {
|
||||
this.shipAddr1 = shipAddr1;
|
||||
}
|
||||
|
@ -84,6 +77,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getShipAddr2() {
|
||||
return shipAddr2;
|
||||
}
|
||||
|
||||
public void setShipAddr2(String shipAddr2) {
|
||||
this.shipAddr2 = shipAddr2;
|
||||
}
|
||||
|
@ -93,6 +87,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getShipCity() {
|
||||
return shipCity;
|
||||
}
|
||||
|
||||
public void setShipCity(String shipCity) {
|
||||
this.shipCity = shipCity;
|
||||
}
|
||||
|
@ -102,6 +97,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getShipZipCode() {
|
||||
return shipZipCode;
|
||||
}
|
||||
|
||||
public void setShipZipCode(String shipZipCode) {
|
||||
this.shipZipCode = shipZipCode;
|
||||
}
|
||||
|
@ -111,6 +107,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getShipCountry() {
|
||||
return shipCountry;
|
||||
}
|
||||
|
||||
public void setShipCountry(String shipCountry) {
|
||||
this.shipCountry = shipCountry;
|
||||
}
|
||||
|
@ -120,6 +117,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getBillAddr1() {
|
||||
return billAddr1;
|
||||
}
|
||||
|
||||
public void setBillAddr1(String billAddr1) {
|
||||
this.billAddr1 = billAddr1;
|
||||
}
|
||||
|
@ -129,6 +127,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getBillAddr2() {
|
||||
return billAddr2;
|
||||
}
|
||||
|
||||
public void setBillAddr2(String billAddr2) {
|
||||
this.billAddr2 = billAddr2;
|
||||
}
|
||||
|
@ -138,6 +137,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getBillCity() {
|
||||
return billCity;
|
||||
}
|
||||
|
||||
public void setBillCity(String billCity) {
|
||||
this.billCity = billCity;
|
||||
}
|
||||
|
@ -147,6 +147,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getBillZipCode() {
|
||||
return billZipCode;
|
||||
}
|
||||
|
||||
public void setBillZipCode(String billZipCode) {
|
||||
this.billZipCode = billZipCode;
|
||||
}
|
||||
|
@ -156,6 +157,7 @@ public class Order extends AbstractPetStoreEntity {
|
|||
public String getBillCountry() {
|
||||
return billCountry;
|
||||
}
|
||||
|
||||
public void setBillCountry(String billCountry) {
|
||||
this.billCountry = billCountry;
|
||||
}
|
||||
|
|
|
@ -3,40 +3,30 @@ 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 javax.persistence.Table;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
@Table(name=AbstractPetStoreDBTable.ORDER_LINE,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
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
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="order_id",nullable=false)
|
||||
@VascModelReference
|
||||
public Order getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(Order order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
@ -46,16 +36,18 @@ public class OrderLine extends AbstractPetStoreEntity {
|
|||
public Integer getLineNumber() {
|
||||
return lineNumber;
|
||||
}
|
||||
|
||||
public void setLineNumber(Integer lineNumber) {
|
||||
this.lineNumber = lineNumber;
|
||||
}
|
||||
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="item_id",nullable=false)
|
||||
@VascModelReference
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="item_id",nullable=false)
|
||||
@VascModelReference
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public void setItem(Item item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
@ -64,6 +56,7 @@ public class OrderLine extends AbstractPetStoreEntity {
|
|||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
@ -72,6 +65,7 @@ public class OrderLine extends AbstractPetStoreEntity {
|
|||
public Float getItemPrice() {
|
||||
return itemPrice;
|
||||
}
|
||||
|
||||
public void setItemPrice(Float itemPrice) {
|
||||
this.itemPrice = itemPrice;
|
||||
}
|
||||
|
|
|
@ -3,61 +3,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=AbstractPetStoreDBTable.ORDER_STATUS,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
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)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public Boolean getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setActive(Boolean active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
@Column(name="name",nullable=false)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreFieldTemplates.class)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.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)
|
||||
@VascFieldTemplate(templateClass=AbstractPetStoreVascFieldTemplate.class)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
|
|
@ -2,15 +2,14 @@ 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=AbstractPetStoreDBTable.USER_ACCOUNT,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
public class UserAccount extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
|
||||
private String email = null;
|
||||
private String firstName = null;
|
||||
private String lastName = null;
|
||||
|
@ -20,20 +19,11 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
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;
|
||||
}
|
||||
|
@ -43,6 +33,7 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
@ -52,6 +43,7 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
@ -61,6 +53,7 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
public String getStreetName() {
|
||||
return streetName;
|
||||
}
|
||||
|
||||
public void setStreetName(String streetName) {
|
||||
this.streetName = streetName;
|
||||
}
|
||||
|
@ -70,6 +63,7 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
public String getStreetNumber() {
|
||||
return streetNumber;
|
||||
}
|
||||
|
||||
public void setStreetNumber(String streetNumber) {
|
||||
this.streetNumber = streetNumber;
|
||||
}
|
||||
|
@ -79,6 +73,7 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
public String getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
@ -87,6 +82,7 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
@ -96,6 +92,7 @@ public class UserAccount extends AbstractPetStoreEntity {
|
|||
public String getCountryState() {
|
||||
return countryState;
|
||||
}
|
||||
|
||||
public void setCountryState(String countryState) {
|
||||
this.countryState = countryState;
|
||||
}
|
||||
|
|
|
@ -3,18 +3,17 @@ 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 javax.persistence.Table;
|
||||
|
||||
import net.forwardfire.vasc.annotations.VascField;
|
||||
import net.forwardfire.vasc.annotations.VascFieldTemplate;
|
||||
import net.forwardfire.vasc.annotations.VascModelReference;
|
||||
|
||||
@Entity
|
||||
@Table(name=AbstractPetStoreDBTable.USER_CREDENTIAL,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
public class UserCredential extends AbstractPetStoreEntity {
|
||||
|
||||
private Integer id = null;
|
||||
private UserAccount userAccount = null;
|
||||
private String password = null;
|
||||
private String secretQuestion0 = null;
|
||||
|
@ -22,19 +21,9 @@ public class UserCredential extends AbstractPetStoreEntity {
|
|||
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
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name="user_account_id",nullable=false)
|
||||
@VascModelReference
|
||||
public UserAccount getUserAccount() {
|
||||
return userAccount;
|
||||
}
|
||||
|
|
|
@ -3,81 +3,76 @@ 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 javax.persistence.Table;
|
||||
|
||||
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
|
||||
@Table(name=AbstractPetStoreDBTable.USER_PROFILE,schema=AbstractPetStoreDBCatalog.SCHEMA)
|
||||
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)
|
||||
@Column(name=AbstractPetStoreDBColumn.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)
|
||||
@Column(name=AbstractPetStoreDBColumn.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)
|
||||
@Column(name=AbstractPetStoreDBColumn.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
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name=AbstractPetStoreDBColumn.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
|
||||
@OneToOne(fetch=FetchType.LAZY)
|
||||
@JoinColumn(name=AbstractPetStoreDBColumn.USER_CATEGORY_ID,nullable=false)
|
||||
@VascModelReference
|
||||
public Category getUserCategory() {
|
||||
return userCategory;
|
||||
}
|
||||
|
||||
public void setUserCategory(Category userCategory) {
|
||||
this.userCategory = userCategory;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ 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.VascMenuWebComparator;
|
||||
import net.forwardfire.vasc.demo.tech.domain.menu.model.VascMenuWebType;
|
||||
import net.forwardfire.vasc.demo.tech.domain.petstore.model.AbstractPetStoreVascBackend.OrderBackend;
|
||||
|
||||
/**
|
||||
* MenuController Shows the menu for the user.
|
||||
|
@ -64,6 +65,9 @@ public class VascMenuControllerImpl implements VascMenuControllerLocal,VascMenuC
|
|||
|
||||
public VascMenuControllerImpl() {
|
||||
vascMenuWebComparator = new VascMenuWebComparator();
|
||||
|
||||
|
||||
OrderBackend ob = null;
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> fetchVascMenuWeb() {
|
||||
|
|
|
@ -174,6 +174,8 @@ public class VascExportServlet extends HttpServlet {
|
|||
VascEntryLocal ve = (VascEntryLocal)vc.getVascEntryConfigController().configVascEntry(vc, entryId);
|
||||
vc.getVascEntryConfigController().configVascFrontendController(vc, ve);
|
||||
|
||||
ve.getVascFrontendController().getVascFrontendActions().refreshData();
|
||||
|
||||
VascEntryExport ex = vc.getVascEntryConfigController().getVascEntryExporterById(exportId);
|
||||
VascEntryExportWriter exw = ex.createExportWriter();
|
||||
exw.doInit(ex, ve);
|
||||
|
|
Loading…
Reference in a new issue