public String get(Schema schema) { // delay this so that we don't do schema reflection for unique // table name unless necessary return cls.getMappingRepository().getMappingDefaults(). getTableName(cls, schema); } public DBIdentifier getIdentifier(Schema schema) {
public void populate(Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { val.getMappingRepository().getMappingDefaults(). populateForeignKeyColumn(val, name, local, foreign, col, target, inverse, pos, cols); } };
public String get(Schema schema) { // delay this so that we don't do schema reflection for unique // table name unless necessary return cls.getMappingRepository().getMappingDefaults(). getTableName(cls, schema); } public DBIdentifier getIdentifier(Schema schema) {
public void populate(Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { cls.getMappingRepository().getMappingDefaults(). populateJoinColumn(cls, local, foreign, col, target, pos, cols); } };
public void populate(Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { field.getMappingRepository().getMappingDefaults(). populateJoinColumn(field, local, foreign, col, target, pos, cols); } };
public void populate(Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { val.getMappingRepository().getMappingDefaults(). populateForeignKeyColumn(val, name, local, foreign, col, target, !inverse, pos, cols); } };
public DBIdentifier getIdentifier(Schema schema) { return cls.getMappingRepository().getMappingDefaults(). getTableIdentifier(cls, schema); } }, _schemaName, tableName, adapt);
public void populate(Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { val.getMappingRepository().getMappingDefaults(). populateForeignKeyColumn(val, name, local, foreign, col, target, inverse, pos, cols); } };
public DBIdentifier getIdentifier(Schema schema) { return cls.getMappingRepository().getMappingDefaults(). getTableIdentifier(cls, schema); } }, _schemaName, tableName, adapt);
public void populate(Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { field.getMappingRepository().getMappingDefaults(). populateJoinColumn(field, local, foreign, col, target, pos, cols); } };
/** * Return the datastore identity columns for the given class, based on the * given templates. */ public Column[] getDataStoreIdColumns(ClassMapping cls, Column[] tmplates, Table table, boolean adapt) { cls.getMappingRepository().getMappingDefaults(). populateDataStoreIdColumns(cls, table, tmplates); return createColumns(cls, "datastoreid", tmplates, table, adapt); }
public Column[] getColumns(ValueMapping val, DBIdentifier name, Column[] tmplates, Table table, boolean adapt) { orderColumnsByTargetField(val, tmplates, adapt); val.getMappingRepository().getMappingDefaults().populateColumns (val, name, table, tmplates); return createColumns(val, null, tmplates, table, adapt); }
/** * Return the index to set on the version columns, or null if none. */ public Index getIndex(Version version, Column[] cols, boolean adapt) { Index idx = null; if (cols.length > 0) idx = version.getMappingRepository().getMappingDefaults(). getIndex(version, cols[0].getTable(), cols); return createIndex(version, null, idx, cols, adapt); }
/** * Constructor. Supply owning mapping. */ public ValueMappingImpl(FieldMapping owner) { super(owner); _info = owner.getMappingRepository().newMappingInfo(this); _info.setUseClassCriteria(owner.getMappingRepository(). getMappingDefaults().useClassCriteria()); }
/** * Return the columns set for this discriminator, based on the given * templates. */ public Column[] getColumns(Discriminator discrim, Column[] tmplates, boolean adapt) { Table table = discrim.getClassMapping().getTable(); discrim.getMappingRepository().getMappingDefaults().populateColumns (discrim, table, tmplates); return createColumns(discrim, null, tmplates, table, adapt); }
/** * Constructor. Supply owning mapping. */ public ValueMappingImpl(FieldMapping owner) { super(owner); _info = owner.getMappingRepository().newMappingInfo(this); _info.setUseClassCriteria(owner.getMappingRepository(). getMappingDefaults().useClassCriteria()); }
public Unique getUnique(ValueMapping val, DBIdentifier name, boolean adapt) { Column[] cols = val.getColumns(); if (cols.length == 0) return null; Unique unq = val.getMappingRepository().getMappingDefaults(). getUnique(val, name, cols[0].getTable(), cols); return createUnique(val, null, unq, cols, adapt); }
public Index getIndex(ValueMapping val, DBIdentifier name, boolean adapt) { Column[] cols = val.getColumns(); if (cols.length == 0) return null; Index idx = val.getMappingRepository().getMappingDefaults(). getIndex(val, name, cols[0].getTable(), cols); return createIndex(val, null, idx, cols, adapt); }
/** * Maps the primary key on the secondary table for this field, if the * user's defaults create one. This must be called after * this field is mapped so that it's table has its columns set. */ public void mapPrimaryKey(boolean adapt) { if (adapt && _fk != null && _fk.getTable().getPrimaryKey() == null) getMappingRepository().getMappingDefaults(). installPrimaryKey(this, _fk.getTable()); }
/** * Return the columns set for this version, based on the given templates. */ public Column[] getColumns(Version version, Column[] templates, boolean adapt) { if (spansMultipleTables(templates)) return getMultiTableColumns(version, templates, adapt); Table table = getSingleTable(version, templates); version.getMappingRepository().getMappingDefaults().populateColumns (version, table, templates); return createColumns(version, null, templates, table, adapt); }