public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey( table ); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey( getCollectionTable() ); pk.addColumns( getIdentifier().getColumnIterator() ); getCollectionTable().setPrimaryKey(pk); } // create an index on the key columns?? }
public void createPrimaryKey() { //Primary key constraint final Table table = getTable(); PrimaryKey pk = new PrimaryKey( table ); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey( pk ); pk.addColumns( getKey().getColumnIterator() ); }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey( getCollectionTable() ); pk.addColumns( getKey().getColumnIterator() ); Iterator iter = getElement().getColumnIterator(); while ( iter.hasNext() ) { Object selectable = iter.next(); if ( selectable instanceof Column ) { Column col = (Column) selectable; if ( !col.isNullable() ) { pk.addColumn( col ); } else { return; } } } if ( pk.getColumnSpan() == getKey().getColumnSpan() ) { //for backward compatibility, allow a set with no not-null //element columns, using all columns in the row locater SQL //TODO: create an implicit not null constraint on all cols? } else { getCollectionTable().setPrimaryKey( pk ); } } else { //create an index on the key columns?? } }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey( getCollectionTable() ); pk.addColumns( getKey().getColumnIterator() );
table.setPrimaryKey( new PrimaryKey( table ) ); table.getPrimaryKey().addColumn( segmentColumn );
table.setPrimaryKey( new PrimaryKey( table ) );
public PrimaryKey<?> getValue(String stringValue) { @SuppressWarnings("rawtypes") //a raw type is necessary to placate javac final PrimaryKey<?> pk = new PrimaryKey(stringValue); return pk; }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey(); pk.addColumns( getIdentifier().getColumnIterator() ); getCollectionTable().setPrimaryKey(pk); } else { // don't create a unique key, 'cos some // databases don't like a UK on nullable // columns //getCollectionTable().createUniqueKey( getIdentifier().getConstraintColumns() ); } // create an index on the key columns?? }
void createPrimaryKey() { if ( !isOneToMany() ) { MappedPrimaryKey pk = new PrimaryKey( getMappedTable() ); pk.addColumns( getIdentifier().getMappedColumns() ); getMappedTable().setPrimaryKey(pk); } // create an index on the key columns?? }
public void createPrimaryKey() { //Primary key constraint MappedPrimaryKey pk = new PrimaryKey( table ); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getMappedColumns() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint final MappedTable table = getMappedTable(); MappedPrimaryKey pk = new PrimaryKey( table ); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey( pk ); pk.addColumns( getKey().getMappedColumns() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); Table table = getTable(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); Table table = getTable(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); Table table = getTable(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); Table table = getTable(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }