blob: acf05d0453cc0a27e62f0279e8127a140cc7d292 [file] [log] [blame]
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// tware - added cascaded locking testing
package org.eclipse.persistence.testing.models.optimisticlocking;
public class AnimalTableCreator extends org.eclipse.persistence.tools.schemaframework.TableCreator {
/**
* <b>WARNING</b>: This code was generated by an automated tool.
* Any changes will be lost when the code is re-generated
*/
public AnimalTableCreator() {
applyPROJECT();
buildANIMALTable();
buildTOYTable();
build_VET_APPT_Table();
buildCATTable();
}
/**
* TopLink generated method.
* <b>WARNING</b>: This code was generated by an automated tool.
* Any changes will be lost when the code is re-generated
*/
protected void applyPROJECT() {
setName("Animal");
}
/**
* TopLink generated method.
* <b>WARNING</b>: This code was generated by an automated tool.
* Any changes will be lost when the code is re-generated
*/
protected void buildANIMALTable() {
org.eclipse.persistence.tools.schemaframework.TableDefinition tabledefinition = new org.eclipse.persistence.tools.schemaframework.TableDefinition();
// SECTION: TABLE
tabledefinition.setName("OL_ANIMAL");
// SECTION: FIELD
org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition();
field.setName("ID");
field.setTypeName("INTEGER");
field.setShouldAllowNull(false);
field.setIsPrimaryKey(true);
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("VERSION");
field1.setTypeName("INTEGER");
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("NAME");
field2.setTypeName("VARCHAR");
field2.setShouldAllowNull(true);
field2.setIsPrimaryKey(false);
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("ANIMAL_TYPE");
field3.setTypeName("VARCHAR");
field3.setShouldAllowNull(true);
field3.setIsPrimaryKey(false);
field3.setUnique(false);
field3.setIsIdentity(false);
tabledefinition.addField(field3);
addTableDefinition(tabledefinition);
}
protected void buildCATTable() {
org.eclipse.persistence.tools.schemaframework.TableDefinition tabledefinition = new org.eclipse.persistence.tools.schemaframework.TableDefinition();
// SECTION: TABLE
tabledefinition.setName("OL_CAT");
// SECTION: FIELD
org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition();
field.setName("ID");
field.setTypeName("INTEGER");
field.setShouldAllowNull(false);
field.setIsPrimaryKey(true);
field.setUnique(false);
field.setIsIdentity(false);
tabledefinition.addField(field);
// SECTION: FIELD
org.eclipse.persistence.tools.schemaframework.FieldDefinition field2 = new org.eclipse.persistence.tools.schemaframework.FieldDefinition();
field2.setName("NAME");
field2.setTypeName("VARCHAR");
field2.setShouldAllowNull(true);
field2.setIsPrimaryKey(false);
field2.setUnique(false);
field2.setIsIdentity(false);
tabledefinition.addField(field2);
addTableDefinition(tabledefinition);
}
/**
* TopLink generated method.
* <b>WARNING</b>: This code was generated by an automated tool.
* Any changes will be lost when the code is re-generated
*/
protected void buildTOYTable() {
org.eclipse.persistence.tools.schemaframework.TableDefinition tabledefinition = new org.eclipse.persistence.tools.schemaframework.TableDefinition();
// SECTION: TABLE
tabledefinition.setName("OL_TOY");
// SECTION: FIELD
org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition();
field.setName("ID");
field.setTypeName("INTEGER");
field.setShouldAllowNull(false);
field.setIsPrimaryKey(true);
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("VERSION");
field1.setTypeName("INTEGER");
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("NAME");
field2.setTypeName("VARCHAR");
field2.setShouldAllowNull(true);
field2.setIsPrimaryKey(false);
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("ANIMAL_ID");
field3.setTypeName("INTEGER");
field3.setShouldAllowNull(true);
field3.setIsPrimaryKey(false);
field3.setUnique(false);
field3.setIsIdentity(false);
tabledefinition.addField(field3);
addTableDefinition(tabledefinition);
}
protected void build_VET_APPT_Table() {
org.eclipse.persistence.tools.schemaframework.TableDefinition tabledefinition = new org.eclipse.persistence.tools.schemaframework.TableDefinition();
// SECTION: TABLE
tabledefinition.setName("OL_VET_APPT");
// SECTION: FIELD
org.eclipse.persistence.tools.schemaframework.FieldDefinition field = new org.eclipse.persistence.tools.schemaframework.FieldDefinition();
field.setName("ID");
field.setTypeName("INTEGER");
field.setShouldAllowNull(false);
field.setIsPrimaryKey(true);
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("VERSION");
field1.setTypeName("INTEGER");
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("COST");
field2.setTypeName("INTEGER");
field2.setShouldAllowNull(true);
field2.setIsPrimaryKey(false);
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("ANIMAL_ID");
field3.setTypeName("INTEGER");
field3.setShouldAllowNull(true);
field3.setIsPrimaryKey(false);
field3.setUnique(false);
field3.setIsIdentity(false);
tabledefinition.addField(field3);
addTableDefinition(tabledefinition);
}
}