/** Return a platform independant definition of the database table. */ public static TableDefinition tableDefinition(Session session) { TableDefinition definition = TypeTester.tableDefinition(); FieldDefinition fieldDef; definition.setName("BOOLEANS"); fieldDef = new FieldDefinition("BOOLEANV", Boolean.class); fieldDef.setShouldAllowNull(false); definition.addField(fieldDef); fieldDef = new FieldDefinition("BOOLEANC", Boolean.class); fieldDef.setShouldAllowNull(false); definition.addField(fieldDef); return definition; }
@Override public void writeAddColumnClause( Writer writer, AbstractSession session, TableDefinition table, FieldDefinition field) throws IOException { writer.write("ADD ("); field.appendDBString(writer, session, table); writer.write(")"); }
/** * This is Oracle specific Oracle does not allow blobs/longs to be primary keys, so the RAW type * needs to be used */ public static TableDefinition buildPrimitiveByteArrayTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_PBYTEARRAYPK_TYPE"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("ID"); fieldID.setTypeName("RAW"); fieldID.setSize(16); fieldID.setSubSize(0); fieldID.setIsPrimaryKey(true); fieldID.setIsIdentity(true); fieldID.setUnique(false); fieldID.setShouldAllowNull(false); table.addField(fieldID); return table; }
public static TableDefinition buildREADONLYCLASSTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_READONLY"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(15); fieldID.setSubSize(0); fieldID.setIsPrimaryKey(true); fieldID.setIsIdentity(true); fieldID.setUnique(false); fieldID.setShouldAllowNull(false); table.addField(fieldID); return table; }
public static TableDefinition buildWHEELRIMTable() { // CREATE TABLE JPA_OR_WHEEL_RIM (ID NUMBER(10) NOT NULL, PRIMARY KEY (ID)) TableDefinition table = new TableDefinition(); table.setName("JPA_OR_WHEEL_RIM"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(10); fieldID.setSubSize(0); fieldID.setIsPrimaryKey(true); fieldID.setIsIdentity(true); fieldID.setShouldAllowNull(false); fieldID.setUnique(false); table.addField(fieldID); return table; }
public static TableDefinition buildCACHEABLE_TRUE_ENTITYTable() { TableDefinition table = new TableDefinition(); table.setName("XML_CACHEABLE_TRUE"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(15); fieldID.setShouldAllowNull(false); fieldID.setIsPrimaryKey(true); fieldID.setUnique(false); fieldID.setIsIdentity(true); table.addField(fieldID); return table; }
public TableDefinition buildUnderbossTable() { TableDefinition table = new TableDefinition(); table.setName("JPA_UNDERBOSS"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(15); fieldID.setIsPrimaryKey(true); fieldID.setIsIdentity(true); fieldID.setUnique(false); fieldID.setShouldAllowNull(false); // fieldID.setForeignKeyFieldName("JPA_MAFIOSO.ID"); table.addField(fieldID); return table; }
@Override /** * EclipseLink does not support length dependent type mapping. Map varchar types with length > * MAX_VARCHAR_UNICODE_LENGTH to CLOB (i.e clob); shorter types to NVARCHAR (n) See also bugs * 317597, 317448 */ protected void printFieldTypeSize( Writer writer, FieldDefinition field, FieldTypeDefinition fieldType) throws IOException { String typeName = fieldType.getName(); if ("NVARCHAR".equals(typeName)) { if (field.getSize() > MAX_VARTYPE_LENGTH) { fieldType = new FieldTypeDefinition("NCLOB", false); } } else if ("VARBINARY".equals(typeName)) { if (field.getSize() > MAX_VARTYPE_LENGTH || field.getSize() == 0) { fieldType = new FieldTypeDefinition("BLOB", false); } } super.printFieldTypeSize(writer, field, fieldType); if (fieldType.getTypesuffix() != null) { writer.append(" " + fieldType.getTypesuffix()); } }
public static TableDefinition buildEMPLOYEETable() { TableDefinition table = new TableDefinition(); // SECTION: TABLE table.setName("CMP3_XML_EMPLOYEE"); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field.setName("EMP_ID"); field.setTypeName("NUMERIC"); field.setSize(15); field.setShouldAllowNull(false); field.setIsPrimaryKey(true); field.setUnique(false); field.setIsIdentity(true); table.addField(field); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field1 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field1.setName("F_NAME"); field1.setTypeName("VARCHAR"); field1.setSize(40); field1.setShouldAllowNull(true); field1.setIsPrimaryKey(false); field1.setUnique(false); field1.setIsIdentity(false); table.addField(field1); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field2 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field2.setName("L_NAME"); field2.setTypeName("VARCHAR"); field2.setSize(40); field2.setShouldAllowNull(true); field2.setIsPrimaryKey(false); field2.setUnique(false); field2.setIsIdentity(false); table.addField(field2); org.eclipse.persistence.tools.schemaframework.FieldDefinition sin = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); sin.setName("SIN"); sin.setTypeName("VARCHAR"); sin.setSize(10); sin.setShouldAllowNull(true); sin.setIsPrimaryKey(false); sin.setUnique(false); sin.setIsIdentity(false); table.addField(sin); FieldDefinition fieldGender = new FieldDefinition(); fieldGender.setName("GENDER"); fieldGender.setTypeName("VARCHAR"); fieldGender.setSize(1); fieldGender.setShouldAllowNull(true); fieldGender.setIsPrimaryKey(false); fieldGender.setUnique(false); fieldGender.setIsIdentity(false); table.addField(fieldGender); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field3 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field3.setName("START_DATE"); field3.setTypeName("DATE"); field3.setSize(23); field3.setShouldAllowNull(true); field3.setIsPrimaryKey(false); field3.setUnique(false); field3.setIsIdentity(false); table.addField(field3); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field4 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field4.setName("END_DATE"); field4.setTypeName("DATE"); field4.setSize(23); field4.setShouldAllowNull(true); field4.setIsPrimaryKey(false); field4.setUnique(false); field4.setIsIdentity(false); table.addField(field4); FieldDefinition field5 = new FieldDefinition(); field5.setName("START_TIME"); field5.setTypeName("TIME"); field5.setSize(23); field5.setShouldAllowNull(true); field5.setIsPrimaryKey(false); field5.setUnique(false); field5.setIsIdentity(false); table.addField(field5); FieldDefinition field6 = new FieldDefinition(); field6.setName("END_TIME"); field6.setTypeName("TIME"); field6.setSize(23); field6.setShouldAllowNull(true); field6.setIsPrimaryKey(false); field6.setUnique(false); field6.setIsIdentity(false); table.addField(field6); FieldDefinition fieldOvertimeStart = new FieldDefinition(); fieldOvertimeStart.setName("START_OVERTIME"); fieldOvertimeStart.setTypeName("TIME"); fieldOvertimeStart.setSize(23); fieldOvertimeStart.setShouldAllowNull(true); fieldOvertimeStart.setIsPrimaryKey(false); fieldOvertimeStart.setUnique(false); fieldOvertimeStart.setIsIdentity(false); table.addField(fieldOvertimeStart); FieldDefinition fieldOvertimeEnd = new FieldDefinition(); fieldOvertimeEnd.setName("END_OVERTIME"); fieldOvertimeEnd.setTypeName("TIME"); fieldOvertimeEnd.setSize(23); fieldOvertimeEnd.setShouldAllowNull(true); fieldOvertimeEnd.setIsPrimaryKey(false); fieldOvertimeEnd.setUnique(false); fieldOvertimeEnd.setIsIdentity(false); table.addField(fieldOvertimeEnd); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field8 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field8.setName("ADDR_ID"); field8.setTypeName("NUMERIC"); field8.setSize(15); field8.setShouldAllowNull(true); field8.setIsPrimaryKey(false); field8.setUnique(false); field8.setIsIdentity(false); field8.setForeignKeyFieldName("CMP3_XML_ADDRESS.ADDRESS_ID"); table.addField(field8); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field9 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field9.setName("MANAGER_EMP_ID"); field9.setTypeName("NUMERIC"); field9.setSize(15); field9.setShouldAllowNull(true); field9.setIsPrimaryKey(false); field9.setUnique(false); field9.setIsIdentity(false); field9.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(field9); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field10 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field10.setName("VERSION"); field10.setTypeName("NUMERIC"); field10.setSize(15); field10.setShouldAllowNull(true); field10.setIsPrimaryKey(false); field10.setUnique(false); field10.setIsIdentity(false); table.addField(field10); FieldDefinition fieldPayScale = new FieldDefinition(); fieldPayScale.setName("PAY_SCALE"); fieldPayScale.setTypeName("VARCHAR"); fieldPayScale.setSize(40); fieldPayScale.setIsPrimaryKey(false); fieldPayScale.setUnique(false); fieldPayScale.setIsIdentity(false); fieldPayScale.setShouldAllowNull(true); table.addField(fieldPayScale); return table; }
public static TableDefinition buildDEALERTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_DEALER"); FieldDefinition field = new FieldDefinition(); field.setName("DEALER_ID"); field.setTypeName("NUMERIC"); field.setSize(15); field.setShouldAllowNull(false); field.setIsPrimaryKey(true); field.setUnique(false); field.setIsIdentity(true); table.addField(field); FieldDefinition field0 = new FieldDefinition(); field0.setName("FK_EMP_ID"); field0.setTypeName("NUMERIC"); field0.setSize(15); field0.setShouldAllowNull(true); field0.setIsPrimaryKey(false); field0.setUnique(false); field0.setIsIdentity(false); field0.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(field0); FieldDefinition field1 = new FieldDefinition(); field1.setName("F_NAME"); field1.setTypeName("VARCHAR"); field1.setSize(40); field1.setShouldAllowNull(true); field1.setIsPrimaryKey(false); field1.setUnique(false); field1.setIsIdentity(false); table.addField(field1); FieldDefinition field2 = new FieldDefinition(); field2.setName("L_NAME"); field2.setTypeName("VARCHAR"); field2.setSize(40); field2.setShouldAllowNull(true); field2.setIsPrimaryKey(false); field2.setUnique(false); field2.setIsIdentity(false); table.addField(field2); FieldDefinition field3 = new FieldDefinition(); field3.setName("STATUS"); field3.setTypeName("VARCHAR"); field3.setSize(40); field3.setShouldAllowNull(true); field3.setIsPrimaryKey(false); field3.setUnique(false); field3.setIsIdentity(false); table.addField(field3); FieldDefinition field4 = new FieldDefinition(); field4.setName("VERSION"); field4.setTypeName("NUMERIC"); field4.setSize(15); field4.setShouldAllowNull(true); field4.setIsPrimaryKey(false); field4.setUnique(false); field4.setIsIdentity(false); table.addField(field4); return table; }
public static TableDefinition buildCREDITLINESTable() { TableDefinition table = new TableDefinition(); table.setName("EMP_CREDITLINES"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("EMP_ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(15); fieldID.setShouldAllowNull(false); fieldID.setIsPrimaryKey(false); fieldID.setUnique(false); fieldID.setIsIdentity(false); fieldID.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(fieldID); FieldDefinition fieldBANK = new FieldDefinition(); fieldBANK.setName("BANK"); fieldBANK.setTypeName("VARCHAR"); fieldBANK.setSize(4); fieldBANK.setShouldAllowNull(false); fieldBANK.setIsPrimaryKey(false); fieldBANK.setUnique(true); fieldBANK.setIsIdentity(false); table.addField(fieldBANK); FieldDefinition fieldACCOUNT = new FieldDefinition(); fieldACCOUNT.setName("ACCOUNT"); fieldACCOUNT.setTypeName("VARCHAR"); fieldACCOUNT.setSize(10); fieldACCOUNT.setShouldAllowNull(false); fieldACCOUNT.setIsPrimaryKey(false); fieldACCOUNT.setUnique(false); fieldACCOUNT.setIsIdentity(false); table.addField(fieldACCOUNT); return table; }
public static TableDefinition buildCREDITCARDSTable() { TableDefinition table = new TableDefinition(); table.setName("XMLEmployee_CREDITCARDS"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("EMP_ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(15); fieldID.setShouldAllowNull(false); fieldID.setIsPrimaryKey(false); fieldID.setUnique(false); fieldID.setIsIdentity(false); fieldID.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(fieldID); FieldDefinition fieldCARD = new FieldDefinition(); fieldCARD.setName("CARD"); fieldCARD.setTypeName("VARCHAR"); fieldCARD.setSize(2); fieldCARD.setShouldAllowNull(false); fieldCARD.setIsPrimaryKey(false); fieldCARD.setUnique(true); fieldCARD.setIsIdentity(false); table.addField(fieldCARD); FieldDefinition fieldNUMB = new FieldDefinition(); fieldNUMB.setName("NUMB"); fieldNUMB.setTypeName("VARCHAR"); fieldNUMB.setSize(10); fieldNUMB.setShouldAllowNull(false); fieldNUMB.setIsPrimaryKey(false); fieldNUMB.setUnique(false); fieldNUMB.setIsIdentity(false); table.addField(fieldNUMB); return table; }
public static TableDefinition buildSALARYTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_SALARY"); FieldDefinition fieldEMP_ID = new FieldDefinition(); fieldEMP_ID.setName("E_ID"); fieldEMP_ID.setTypeName("NUMERIC"); fieldEMP_ID.setSize(15); fieldEMP_ID.setSubSize(0); fieldEMP_ID.setIsPrimaryKey(true); fieldEMP_ID.setIsIdentity(false); fieldEMP_ID.setUnique(false); fieldEMP_ID.setShouldAllowNull(false); fieldEMP_ID.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(fieldEMP_ID); FieldDefinition fieldSALARY = new FieldDefinition(); fieldSALARY.setName("SALARY"); fieldSALARY.setTypeName("NUMBER"); fieldSALARY.setSize(15); fieldSALARY.setSubSize(0); fieldSALARY.setIsPrimaryKey(false); fieldSALARY.setIsIdentity(false); fieldSALARY.setUnique(false); fieldSALARY.setShouldAllowNull(true); table.addField(fieldSALARY); return table; }
public static TableDefinition buildPROJECTTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_PROJECT"); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field.setName("PROJ_ID"); field.setTypeName("NUMERIC"); field.setSize(15); field.setShouldAllowNull(false); field.setIsPrimaryKey(true); field.setUnique(false); field.setIsIdentity(true); table.addField(field); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field1 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field1.setName("PROJ_TYPE"); field1.setTypeName("VARCHAR"); field1.setSize(1); field1.setShouldAllowNull(true); field1.setIsPrimaryKey(false); field1.setUnique(false); field1.setIsIdentity(false); table.addField(field1); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field2 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field2.setName("PROJ_NAME"); field2.setTypeName("VARCHAR"); field2.setSize(30); field2.setShouldAllowNull(true); field2.setIsPrimaryKey(false); field2.setUnique(false); field2.setIsIdentity(false); table.addField(field2); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field3 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field3.setName("DESCRIP"); field3.setTypeName("VARCHAR"); field3.setSize(200); field3.setShouldAllowNull(true); field3.setIsPrimaryKey(false); field3.setUnique(false); field3.setIsIdentity(false); table.addField(field3); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field4 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field4.setName("LEADER_ID"); field4.setTypeName("NUMERIC"); field4.setSize(15); field4.setShouldAllowNull(true); field4.setIsPrimaryKey(false); field4.setUnique(false); field4.setIsIdentity(false); field4.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(field4); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field5 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field5.setName("VERSION"); field5.setTypeName("NUMERIC"); field5.setSize(15); field5.setShouldAllowNull(true); field5.setIsPrimaryKey(false); field5.setUnique(false); field5.setIsIdentity(false); table.addField(field5); return table; }
public static TableDefinition buildPHONENUMBERTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_PHONENUMBER"); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field.setName("OWNER_ID"); field.setTypeName("NUMERIC"); field.setSize(15); field.setShouldAllowNull(false); field.setIsPrimaryKey(true); field.setUnique(false); field.setIsIdentity(false); field.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(field); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field1 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field1.setName("TYPE"); field1.setTypeName("VARCHAR"); field1.setSize(15); field1.setShouldAllowNull(false); field1.setIsPrimaryKey(true); field1.setUnique(false); field1.setIsIdentity(false); table.addField(field1); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field2 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field2.setName("AREA_CODE"); field2.setTypeName("VARCHAR"); field2.setSize(3); field2.setShouldAllowNull(true); field2.setIsPrimaryKey(false); field2.setUnique(false); field2.setIsIdentity(false); table.addField(field2); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field3 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field3.setName("NUMB"); field3.setTypeName("VARCHAR"); field3.setSize(8); field3.setShouldAllowNull(true); field3.setIsPrimaryKey(false); field3.setUnique(false); field3.setIsIdentity(false); table.addField(field3); return table; }
public static TableDefinition buildADDRESSTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_ADDRESS"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("ADDRESS_ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(15); fieldID.setSubSize(0); fieldID.setIsPrimaryKey(true); fieldID.setIsIdentity(true); fieldID.setUnique(false); fieldID.setShouldAllowNull(false); table.addField(fieldID); FieldDefinition fieldSTREET = new FieldDefinition(); fieldSTREET.setName("STREET"); fieldSTREET.setTypeName("VARCHAR2"); fieldSTREET.setSize(60); fieldSTREET.setSubSize(0); fieldSTREET.setIsPrimaryKey(false); fieldSTREET.setIsIdentity(false); fieldSTREET.setUnique(false); fieldSTREET.setShouldAllowNull(true); table.addField(fieldSTREET); FieldDefinition fieldCITY = new FieldDefinition(); fieldCITY.setName("CITY"); fieldCITY.setTypeName("VARCHAR2"); fieldCITY.setSize(60); fieldCITY.setSubSize(0); fieldCITY.setIsPrimaryKey(false); fieldCITY.setIsIdentity(false); fieldCITY.setUnique(false); fieldCITY.setShouldAllowNull(true); table.addField(fieldCITY); FieldDefinition fieldPROVINCE = new FieldDefinition(); fieldPROVINCE.setName("PROVINCE"); fieldPROVINCE.setTypeName("VARCHAR2"); fieldPROVINCE.setSize(60); fieldPROVINCE.setSubSize(0); fieldPROVINCE.setIsPrimaryKey(false); fieldPROVINCE.setIsIdentity(false); fieldPROVINCE.setUnique(false); fieldPROVINCE.setShouldAllowNull(true); table.addField(fieldPROVINCE); FieldDefinition fieldPOSTALCODE = new FieldDefinition(); fieldPOSTALCODE.setName("P_CODE"); fieldPOSTALCODE.setTypeName("VARCHAR2"); fieldPOSTALCODE.setSize(67); fieldPOSTALCODE.setSubSize(0); fieldPOSTALCODE.setIsPrimaryKey(false); fieldPOSTALCODE.setIsIdentity(false); fieldPOSTALCODE.setUnique(false); fieldPOSTALCODE.setShouldAllowNull(true); table.addField(fieldPOSTALCODE); FieldDefinition fieldCOUNTRY = new FieldDefinition(); fieldCOUNTRY.setName("COUNTRY"); fieldCOUNTRY.setTypeName("VARCHAR2"); fieldCOUNTRY.setSize(60); fieldCOUNTRY.setSubSize(0); fieldCOUNTRY.setIsPrimaryKey(false); fieldCOUNTRY.setIsIdentity(false); fieldCOUNTRY.setUnique(false); fieldCOUNTRY.setShouldAllowNull(true); table.addField(fieldCOUNTRY); FieldDefinition fieldType = new FieldDefinition(); fieldType.setName("TYPE"); fieldType.setTypeName("VARCHAR2"); fieldType.setSize(150); fieldType.setSubSize(0); fieldType.setIsPrimaryKey(false); fieldType.setIsIdentity(false); fieldType.setUnique(false); fieldType.setShouldAllowNull(true); table.addField(fieldType); return table; }
public TableDefinition buildVHCL_CLMTable() { TableDefinition table = new TableDefinition(); table.setName("VHCL_CLM"); FieldDefinition fieldCLM_ID = new FieldDefinition(); fieldCLM_ID.setName("CLM_ID"); fieldCLM_ID.setTypeName("NUMBER"); fieldCLM_ID.setSize(18); fieldCLM_ID.setSubSize(0); fieldCLM_ID.setIsPrimaryKey(true); fieldCLM_ID.setIsIdentity(false); fieldCLM_ID.setUnique(false); fieldCLM_ID.setShouldAllowNull(false); table.addField(fieldCLM_ID); FieldDefinition fieldPART = new FieldDefinition(); fieldPART.setName("PART"); fieldPART.setTypeName("VARCHAR2"); fieldPART.setSize(30); fieldPART.setSubSize(0); fieldPART.setIsPrimaryKey(false); fieldPART.setIsIdentity(false); fieldPART.setUnique(false); fieldPART.setShouldAllowNull(true); table.addField(fieldPART); FieldDefinition fieldPART_DESC = new FieldDefinition(); fieldPART_DESC.setName("PART_DESC"); fieldPART_DESC.setTypeName("VARCHAR2"); fieldPART_DESC.setSize(30); fieldPART_DESC.setSubSize(0); fieldPART_DESC.setIsPrimaryKey(false); fieldPART_DESC.setIsIdentity(false); fieldPART_DESC.setUnique(false); fieldPART_DESC.setShouldAllowNull(true); table.addField(fieldPART_DESC); ForeignKeyConstraint foreignKeyFK_VHCL_CLM_CLM_ID = new ForeignKeyConstraint(); foreignKeyFK_VHCL_CLM_CLM_ID.setName("VHCL_CLM_CLAIM"); foreignKeyFK_VHCL_CLM_CLM_ID.setTargetTable("CLAIM"); foreignKeyFK_VHCL_CLM_CLM_ID.addSourceField("CLM_ID"); foreignKeyFK_VHCL_CLM_CLM_ID.addTargetField("CLM_ID"); table.addForeignKeyConstraint(foreignKeyFK_VHCL_CLM_CLM_ID); return table; }
public TableDefinition buildVHCL_POLTable() { TableDefinition table = new TableDefinition(); table.setName("VHCL_POL"); FieldDefinition fieldPOL_ID = new FieldDefinition(); fieldPOL_ID.setName("POL_ID"); fieldPOL_ID.setTypeName("NUMBER"); fieldPOL_ID.setSize(18); fieldPOL_ID.setSubSize(0); fieldPOL_ID.setIsPrimaryKey(true); fieldPOL_ID.setIsIdentity(false); fieldPOL_ID.setUnique(false); fieldPOL_ID.setShouldAllowNull(false); table.addField(fieldPOL_ID); FieldDefinition fieldMODEL = new FieldDefinition(); fieldMODEL.setName("MODEL"); fieldMODEL.setTypeName("VARCHAR2"); fieldMODEL.setSize(30); fieldMODEL.setSubSize(0); fieldMODEL.setIsPrimaryKey(false); fieldMODEL.setIsIdentity(false); fieldMODEL.setUnique(false); fieldMODEL.setShouldAllowNull(true); table.addField(fieldMODEL); ForeignKeyConstraint foreignKeyFK_VHCL_POL_POL_ID = new ForeignKeyConstraint(); foreignKeyFK_VHCL_POL_POL_ID.setName("VHCL_POL_POLICY"); foreignKeyFK_VHCL_POL_POL_ID.setTargetTable("POLICY"); foreignKeyFK_VHCL_POL_POL_ID.addSourceField("POL_ID"); foreignKeyFK_VHCL_POL_POL_ID.addTargetField("POL_ID"); table.addForeignKeyConstraint(foreignKeyFK_VHCL_POL_POL_ID); return table; }
public static org.eclipse.persistence.tools.schemaframework.TableDefinition actorTable() { org.eclipse.persistence.tools.schemaframework.TableDefinition tabledefinition = new org.eclipse.persistence.tools.schemaframework.TableDefinition(); // SECTION: TABLE tabledefinition.setName("ACTOR"); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field.setName("FNAME"); field.setType(String.class); field.setShouldAllowNull(true); field.setIsPrimaryKey(false); field.setUnique(false); field.setIsIdentity(false); tabledefinition.addField(field); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field1 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field1.setName("LNAME"); field1.setType(String.class); field1.setShouldAllowNull(true); field1.setIsPrimaryKey(false); field1.setUnique(false); field1.setIsIdentity(false); tabledefinition.addField(field1); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field2 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field2.setName("ID"); field2.setType(java.math.BigDecimal.class); field2.setShouldAllowNull(false); field2.setIsPrimaryKey(true); field2.setUnique(false); field2.setIsIdentity(false); tabledefinition.addField(field2); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field3 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field3.setName("PROGRAM_ID"); field3.setType(java.math.BigDecimal.class); field3.setShouldAllowNull(false); field3.setIsPrimaryKey(true); field3.setUnique(false); field3.setIsIdentity(false); tabledefinition.addField(field3); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field4 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field4.setName("PROGRAM_TYPE"); field4.setType(String.class); field4.setShouldAllowNull(false); field4.setIsPrimaryKey(true); field4.setUnique(false); field4.setIsIdentity(false); tabledefinition.addField(field4); return tabledefinition; }
public TableDefinition buildCLAIMTable() { TableDefinition table = new TableDefinition(); table.setName("CLAIM"); FieldDefinition fieldCLM_ID = new FieldDefinition(); fieldCLM_ID.setName("CLM_ID"); fieldCLM_ID.setTypeName("NUMBER"); fieldCLM_ID.setSize(18); fieldCLM_ID.setSubSize(0); fieldCLM_ID.setIsPrimaryKey(true); fieldCLM_ID.setIsIdentity(false); fieldCLM_ID.setUnique(false); fieldCLM_ID.setShouldAllowNull(false); table.addField(fieldCLM_ID); FieldDefinition fieldPOL_ID = new FieldDefinition(); fieldPOL_ID.setName("POL_ID"); fieldPOL_ID.setTypeName("NUMBER"); fieldPOL_ID.setSize(18); fieldPOL_ID.setSubSize(0); fieldPOL_ID.setIsPrimaryKey(false); fieldPOL_ID.setIsIdentity(false); fieldPOL_ID.setUnique(false); fieldPOL_ID.setShouldAllowNull(true); table.addField(fieldPOL_ID); FieldDefinition fieldCLM_TYPE = new FieldDefinition(); fieldCLM_TYPE.setName("CLM_TYPE"); fieldCLM_TYPE.setTypeName("VARCHAR2"); fieldCLM_TYPE.setSize(20); fieldCLM_TYPE.setSubSize(0); fieldCLM_TYPE.setIsPrimaryKey(false); fieldCLM_TYPE.setIsIdentity(false); fieldCLM_TYPE.setUnique(false); fieldCLM_TYPE.setShouldAllowNull(true); table.addField(fieldCLM_TYPE); FieldDefinition fieldAMOUNT = new FieldDefinition(); fieldAMOUNT.setName("AMOUNT"); fieldAMOUNT.setTypeName("FLOAT"); fieldAMOUNT.setSize(18); fieldAMOUNT.setSubSize(4); fieldAMOUNT.setIsPrimaryKey(false); fieldAMOUNT.setIsIdentity(false); fieldAMOUNT.setUnique(false); fieldAMOUNT.setShouldAllowNull(true); table.addField(fieldAMOUNT); FieldDefinition fieldDISEASE = new FieldDefinition(); fieldDISEASE.setName("DISEASE"); fieldDISEASE.setTypeName("VARCHAR2"); fieldDISEASE.setSize(50); fieldDISEASE.setSubSize(0); fieldDISEASE.setIsPrimaryKey(false); fieldDISEASE.setIsIdentity(false); fieldDISEASE.setUnique(false); fieldDISEASE.setShouldAllowNull(true); table.addField(fieldDISEASE); FieldDefinition fieldAREA = new FieldDefinition(); fieldAREA.setName("AREA"); fieldAREA.setTypeName("NUMBER"); fieldAREA.setSize(18); fieldAREA.setSubSize(4); fieldAREA.setIsPrimaryKey(false); fieldAREA.setIsIdentity(false); fieldAREA.setUnique(false); fieldAREA.setShouldAllowNull(true); table.addField(fieldAREA); ForeignKeyConstraint foreignKeyFK_CLAIM_POL_ID = new ForeignKeyConstraint(); foreignKeyFK_CLAIM_POL_ID.setName("CLAIM_POL"); foreignKeyFK_CLAIM_POL_ID.setTargetTable("POLICY"); foreignKeyFK_CLAIM_POL_ID.addSourceField("POL_ID"); foreignKeyFK_CLAIM_POL_ID.addTargetField("POL_ID"); table.addForeignKeyConstraint(foreignKeyFK_CLAIM_POL_ID); return table; }
public static TableDefinition buildEMPLOYEE_SEQTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_EMPLOYEE_SEQ"); FieldDefinition fieldSEQ_COUNT = new FieldDefinition(); fieldSEQ_COUNT.setName("SEQ_COUNT"); fieldSEQ_COUNT.setTypeName("NUMBER"); fieldSEQ_COUNT.setSize(15); fieldSEQ_COUNT.setSubSize(0); fieldSEQ_COUNT.setIsPrimaryKey(false); fieldSEQ_COUNT.setIsIdentity(false); fieldSEQ_COUNT.setUnique(false); fieldSEQ_COUNT.setShouldAllowNull(false); table.addField(fieldSEQ_COUNT); FieldDefinition fieldSEQ_NAME = new FieldDefinition(); fieldSEQ_NAME.setName("SEQ_NAME"); fieldSEQ_NAME.setTypeName("VARCHAR2"); fieldSEQ_NAME.setSize(80); fieldSEQ_NAME.setSubSize(0); fieldSEQ_NAME.setIsPrimaryKey(true); fieldSEQ_NAME.setIsIdentity(false); fieldSEQ_NAME.setUnique(false); fieldSEQ_NAME.setShouldAllowNull(false); table.addField(fieldSEQ_NAME); return table; }
public static TableDefinition buildCMP3_ORDERTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_MERGE_ORDER"); FieldDefinition fieldCUST_ID = new FieldDefinition(); fieldCUST_ID.setName("CUSTOMER_CUST_ID"); fieldCUST_ID.setTypeName("NUMBER"); fieldCUST_ID.setSize(15); fieldCUST_ID.setSubSize(0); fieldCUST_ID.setIsPrimaryKey(false); fieldCUST_ID.setIsIdentity(false); fieldCUST_ID.setUnique(false); fieldCUST_ID.setShouldAllowNull(true); table.addField(fieldCUST_ID); FieldDefinition fieldITEM_ID = new FieldDefinition(); fieldITEM_ID.setName("ITEM_ID"); fieldITEM_ID.setTypeName("NUMBER"); fieldITEM_ID.setSize(15); fieldITEM_ID.setSubSize(0); fieldITEM_ID.setIsPrimaryKey(false); fieldITEM_ID.setIsIdentity(false); fieldITEM_ID.setUnique(false); fieldITEM_ID.setShouldAllowNull(true); fieldITEM_ID.setForeignKeyFieldName("CMP3_XML_MERGE_ITEM.ID"); table.addField(fieldITEM_ID); FieldDefinition fieldORDER_ID = new FieldDefinition(); fieldORDER_ID.setName("ORDER_ID"); fieldORDER_ID.setTypeName("NUMBER"); fieldORDER_ID.setSize(15); fieldORDER_ID.setSubSize(0); fieldORDER_ID.setIsPrimaryKey(true); fieldORDER_ID.setIsIdentity(false); fieldORDER_ID.setUnique(false); fieldORDER_ID.setShouldAllowNull(false); table.addField(fieldORDER_ID); FieldDefinition fieldQUANTITY = new FieldDefinition(); fieldQUANTITY.setName("QUANTITY"); fieldQUANTITY.setTypeName("NUMBER"); fieldQUANTITY.setSize(15); fieldQUANTITY.setSubSize(0); fieldQUANTITY.setIsPrimaryKey(false); fieldQUANTITY.setIsIdentity(false); fieldQUANTITY.setUnique(false); fieldQUANTITY.setShouldAllowNull(false); table.addField(fieldQUANTITY); FieldDefinition fieldSHIP_ADDR = new FieldDefinition(); fieldSHIP_ADDR.setName("SHIP_ADDR"); fieldSHIP_ADDR.setTypeName("VARCHAR2"); fieldSHIP_ADDR.setSize(80); fieldSHIP_ADDR.setSubSize(0); fieldSHIP_ADDR.setIsPrimaryKey(false); fieldSHIP_ADDR.setIsIdentity(false); fieldSHIP_ADDR.setUnique(false); fieldSHIP_ADDR.setShouldAllowNull(true); table.addField(fieldSHIP_ADDR); FieldDefinition field10 = new FieldDefinition(); field10.setName("ORDER_VERSION"); field10.setTypeName("NUMERIC"); field10.setSize(15); field10.setShouldAllowNull(true); field10.setIsPrimaryKey(false); field10.setUnique(false); field10.setIsIdentity(false); table.addField(field10); return table; }
public static TableDefinition buildPARTNERLINKTable() { TableDefinition table = new TableDefinition(); table.setName("XML_MW"); FieldDefinition fieldMID = new FieldDefinition(); fieldMID.setName("M"); fieldMID.setTypeName("NUMERIC"); fieldMID.setSize(15); fieldMID.setSubSize(0); fieldMID.setIsPrimaryKey(false); fieldMID.setIsIdentity(false); fieldMID.setUnique(false); fieldMID.setShouldAllowNull(true); fieldMID.setForeignKeyFieldName("XML_MAN.ID"); table.addField(fieldMID); FieldDefinition fieldWID = new FieldDefinition(); fieldWID.setName("W"); fieldWID.setTypeName("NUMERIC"); fieldWID.setSize(15); fieldWID.setSubSize(0); fieldWID.setIsPrimaryKey(false); fieldWID.setIsIdentity(false); fieldWID.setUnique(false); fieldWID.setShouldAllowNull(true); fieldWID.setForeignKeyFieldName("XML_WOMAN.ID"); table.addField(fieldWID); return table; }
public static TableDefinition buildCMP3_PARTSLISTTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_MERGE_PARTSLIST"); FieldDefinition fieldPARTSLIST_ID = new FieldDefinition(); fieldPARTSLIST_ID.setName("ID"); fieldPARTSLIST_ID.setTypeName("NUMBER"); fieldPARTSLIST_ID.setSize(15); fieldPARTSLIST_ID.setSubSize(0); fieldPARTSLIST_ID.setIsPrimaryKey(true); fieldPARTSLIST_ID.setIsIdentity(false); fieldPARTSLIST_ID.setUnique(false); fieldPARTSLIST_ID.setShouldAllowNull(false); table.addField(fieldPARTSLIST_ID); FieldDefinition field10 = new FieldDefinition(); field10.setName("VERSION"); field10.setTypeName("NUMERIC"); field10.setSize(15); field10.setShouldAllowNull(true); field10.setIsPrimaryKey(false); field10.setUnique(false); field10.setIsIdentity(false); table.addField(field10); return table; }
public static TableDefinition buildPROJECT_EMPTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_PROJ_EMP"); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field.setName("EMP_ID"); field.setTypeName("NUMERIC"); field.setSize(15); field.setShouldAllowNull(false); field.setIsPrimaryKey(true); field.setUnique(false); field.setIsIdentity(false); field.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(field); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field1 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field1.setName("PROJ_ID"); field1.setTypeName("NUMERIC"); field1.setSize(15); field1.setShouldAllowNull(false); field1.setIsPrimaryKey(true); field1.setUnique(false); field1.setIsIdentity(false); field1.setForeignKeyFieldName("CMP3_XML_PROJECT.PROJ_ID"); table.addField(field1); return table; }
public static TableDefinition buildCMP3_PARTSLIST_ITEMTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_MERGE_PARTSLIST_ITEM"); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field.setName("PARTSLIST_ID"); field.setTypeName("NUMERIC"); field.setSize(15); field.setShouldAllowNull(false); field.setIsPrimaryKey(true); field.setUnique(false); field.setIsIdentity(false); field.setForeignKeyFieldName("CMP3_XML_MERGE_ITEM.ID"); table.addField(field); // SECTION: FIELD org.eclipse.persistence.tools.schemaframework.FieldDefinition field1 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition(); field1.setName("ITEM_ID"); field1.setTypeName("NUMERIC"); field1.setSize(15); field1.setShouldAllowNull(false); field1.setIsPrimaryKey(true); field1.setUnique(false); field1.setIsIdentity(false); field1.setForeignKeyFieldName("CMP3_XML_MERGE_PARTSLIST.ID"); table.addField(field1); return table; }
public static TableDefinition buildRESPONSTable() { TableDefinition table = new TableDefinition(); // SECTION: TABLE table.setName("CMP3_XML_RESPONS"); // SECTION: FIELD FieldDefinition field = new FieldDefinition(); field.setName("EMP_ID"); field.setTypeName("NUMERIC"); field.setSize(15); field.setShouldAllowNull(false); field.setIsPrimaryKey(false); field.setUnique(false); field.setIsIdentity(false); field.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID"); table.addField(field); // SECTION: FIELD FieldDefinition field1 = new FieldDefinition(); field1.setName("DESCRIPTION"); field1.setTypeName("VARCHAR"); field1.setSize(200); field1.setShouldAllowNull(false); field1.setIsPrimaryKey(false); field1.setUnique(false); field1.setIsIdentity(false); table.addField(field1); return table; }
public static TableDefinition buildCMP3_CUSTOMERTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_MERGE_CUSTOMER"); FieldDefinition fieldCITY = new FieldDefinition(); fieldCITY.setName("CITY"); fieldCITY.setTypeName("VARCHAR2"); fieldCITY.setSize(80); fieldCITY.setSubSize(0); fieldCITY.setIsPrimaryKey(false); fieldCITY.setIsIdentity(false); fieldCITY.setUnique(false); fieldCITY.setShouldAllowNull(true); table.addField(fieldCITY); FieldDefinition fieldCUST_ID = new FieldDefinition(); fieldCUST_ID.setName("CUST_ID"); fieldCUST_ID.setTypeName("NUMBER"); fieldCUST_ID.setSize(15); fieldCUST_ID.setSubSize(0); fieldCUST_ID.setIsPrimaryKey(true); fieldCUST_ID.setIsIdentity(false); fieldCUST_ID.setUnique(false); fieldCUST_ID.setShouldAllowNull(false); table.addField(fieldCUST_ID); FieldDefinition fieldNAME = new FieldDefinition(); fieldNAME.setName("NAME"); fieldNAME.setTypeName("VARCHAR2"); fieldNAME.setSize(80); fieldNAME.setSubSize(0); fieldNAME.setIsPrimaryKey(false); fieldNAME.setIsIdentity(false); fieldNAME.setUnique(false); fieldNAME.setShouldAllowNull(true); table.addField(fieldNAME); FieldDefinition field10 = new FieldDefinition(); field10.setName("CUST_VERSION"); field10.setTypeName("NUMERIC"); field10.setSize(15); field10.setShouldAllowNull(true); field10.setIsPrimaryKey(false); field10.setUnique(false); field10.setIsIdentity(false); table.addField(field10); return table; }
public static TableDefinition buildWOMANTable() { TableDefinition table = new TableDefinition(); table.setName("XML_WOMAN"); FieldDefinition fieldID = new FieldDefinition(); fieldID.setName("ID"); fieldID.setTypeName("NUMERIC"); fieldID.setSize(15); fieldID.setSubSize(0); fieldID.setIsPrimaryKey(true); fieldID.setIsIdentity(true); fieldID.setUnique(false); fieldID.setShouldAllowNull(false); table.addField(fieldID); FieldDefinition field1 = new FieldDefinition(); field1.setName("F_NAME"); field1.setTypeName("VARCHAR"); field1.setSize(40); field1.setShouldAllowNull(true); field1.setIsPrimaryKey(false); field1.setUnique(false); field1.setIsIdentity(false); table.addField(field1); FieldDefinition field2 = new FieldDefinition(); field2.setName("L_NAME"); field2.setTypeName("VARCHAR"); field2.setSize(40); field2.setShouldAllowNull(true); field2.setIsPrimaryKey(false); field2.setUnique(false); field2.setIsIdentity(false); table.addField(field2); return table; }
public static TableDefinition buildCMP3_ITEMTable() { TableDefinition table = new TableDefinition(); table.setName("CMP3_XML_MERGE_ITEM"); FieldDefinition fieldDESCRIPTION = new FieldDefinition(); fieldDESCRIPTION.setName("DESCRIPTION"); fieldDESCRIPTION.setTypeName("VARCHAR2"); fieldDESCRIPTION.setSize(80); fieldDESCRIPTION.setSubSize(0); fieldDESCRIPTION.setIsPrimaryKey(false); fieldDESCRIPTION.setIsIdentity(false); fieldDESCRIPTION.setUnique(false); fieldDESCRIPTION.setShouldAllowNull(true); table.addField(fieldDESCRIPTION); FieldDefinition fieldITEM_ID = new FieldDefinition(); fieldITEM_ID.setName("ID"); fieldITEM_ID.setTypeName("NUMBER"); fieldITEM_ID.setSize(15); fieldITEM_ID.setSubSize(0); fieldITEM_ID.setIsPrimaryKey(true); fieldITEM_ID.setIsIdentity(false); fieldITEM_ID.setUnique(false); fieldITEM_ID.setShouldAllowNull(false); table.addField(fieldITEM_ID); FieldDefinition fieldNAME = new FieldDefinition(); fieldNAME.setName("NAME"); fieldNAME.setTypeName("VARCHAR2"); fieldNAME.setSize(80); fieldNAME.setSubSize(0); fieldNAME.setIsPrimaryKey(false); fieldNAME.setIsIdentity(false); fieldNAME.setUnique(false); fieldNAME.setShouldAllowNull(true); table.addField(fieldNAME); FieldDefinition field10 = new FieldDefinition(); field10.setName("ITEM_VERSION"); field10.setTypeName("NUMERIC"); field10.setSize(15); field10.setShouldAllowNull(true); field10.setIsPrimaryKey(false); field10.setUnique(false); field10.setIsIdentity(false); table.addField(field10); FieldDefinition fieldIMAGE = new FieldDefinition(); fieldIMAGE.setName("IMAGE"); fieldIMAGE.setTypeName("BLOB"); fieldIMAGE.setShouldAllowNull(true); table.addField(fieldIMAGE); return table; }