/** * Embedded constructor. Supply embedding value and owning repository. */ protected ClassMapping(ValueMetaData vmd) { super(vmd); _discrim = getMappingRepository().newDiscriminator(this); _version = getMappingRepository().newVersion(this); _info = getMappingRepository().newMappingInfo(this); }
/** * Embedded constructor. Supply embedding value and owning repository. */ protected ClassMapping(ValueMetaData vmd) { super(vmd); _discrim = getMappingRepository().newDiscriminator(this); _version = getMappingRepository().newVersion(this); _info = getMappingRepository().newMappingInfo(this); }
/** * Embedded constructor. Supply embedding value and owning repository. */ protected ClassMapping(ValueMetaData vmd) { super(vmd); _discrim = getMappingRepository().newDiscriminator(this); _version = getMappingRepository().newVersion(this); _info = getMappingRepository().newMappingInfo(this); }
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 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 DBIdentifier getIdentifier(Schema schema) { return cls.getMappingRepository().getMappingDefaults(). getTableIdentifier(cls, schema); } }, _schemaName, tableName, adapt);
public DBIdentifier getIdentifier(Schema schema) { return cls.getMappingRepository().getMappingDefaults(). getTableIdentifier(cls, schema); } }, _schemaName, tableName, adapt);
public Expression matches(Value v1, Value v2, String single, String multi, String esc) { if (!(v2 instanceof Const)) throw new UserException(_loc.get("const-only", "matches")); if (esc == null && _type.getMappingRepository(). getDBDictionary().requiresSearchStringEscapeForLike == true) { esc = _type.getMappingRepository(). getDBDictionary().searchStringEscape; } return new MatchesExpression((Val) v1, (Const) v2, single, multi, esc); }
public Expression matches(Value v1, Value v2, String single, String multi, String esc) { if (!(v2 instanceof Const)) throw new UserException(_loc.get("const-only", "matches")); if (esc == null && _type.getMappingRepository(). getDBDictionary().requiresSearchStringEscapeForLike == true) { esc = _type.getMappingRepository(). getDBDictionary().searchStringEscape; } return new MatchesExpression((Val) v1, (Const) v2, single, multi, esc); }
public Subquery newSubquery(ClassMetaData candidate, boolean subs, String alias) { DBDictionary dict = _type.getMappingRepository().getDBDictionary(); dict.assertSupport(dict.supportsSubselect, "SupportsSubselect"); return new SubQ((ClassMapping) candidate, subs, alias); }
/** * 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 Subquery newSubquery(ClassMetaData candidate, boolean subs, String alias) { DBDictionary dict = _type.getMappingRepository().getDBDictionary(); dict.assertSupport(dict.supportsSubselect, "SupportsSubselect"); return new SubQ((ClassMapping) candidate, subs, alias); }
/** * 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); }
/** * Constructor. Supply candidate, whether subclasses are included in * the query, and the query alias. */ public SubQ(ClassMapping candidate, boolean subs, String alias) { _candidate = candidate; _subs = subs; _subqAlias = alias; _select = (((JDBCConfiguration) candidate.getMappingRepository(). getConfiguration()).getSQLFactoryInstance().newSelect()); _cons.setSubselect(_select); }
public Expression matches(Value v1, Value v2, String single, String multi, String esc) { if (!(v2 instanceof Const)) throw new UserException(_loc.get("const-only", "matches")); return new MatchesExpression((Val) v1, (Const) v2, single, multi, esc != null ? esc : _type.getMappingRepository(). getDBDictionary().searchStringEscape); }
/** * Constructor. Supply candidate, whether subclasses are included in * the query, and the query alias. */ public SubQ(ClassMapping candidate, boolean subs, String alias) { _candidate = candidate; _subs = subs; _subqAlias = alias; _select = (((JDBCConfiguration) candidate.getMappingRepository(). getConfiguration()).getSQLFactoryInstance().newSelect()); _cons.setSubselect(_select); }
/** * Constructor. */ public FieldMapping(String name, Class<?> type, ClassMapping owner) { super(name, type, owner); _info = owner.getMappingRepository().newMappingInfo(this); _val = (ValueMapping) getValue(); _key = (ValueMapping) getKey(); _elem = (ValueMapping) getElement(); setUsesIntermediate(false); setUsesImplData(Boolean.FALSE); }
/** * Constructor. */ public FieldMapping(String name, Class<?> type, ClassMapping owner) { super(name, type, owner); _info = owner.getMappingRepository().newMappingInfo(this); _val = (ValueMapping) getValue(); _key = (ValueMapping) getKey(); _elem = (ValueMapping) getElement(); setUsesIntermediate(false); setUsesImplData(Boolean.FALSE); }
public void map(boolean adapt) { ClassMapping cls = disc.getClassMapping(); if (cls.getJoinablePCSuperclassMapping() != null || cls.getEmbeddingMetaData() != null) throw new MetaDataException(_loc.get("not-base-disc", cls)); DiscriminatorMappingInfo info = disc.getMappingInfo(); info.assertNoSchemaComponents(disc, true); // make sure outer joins are supported DBDictionary dict = cls.getMappingRepository().getDBDictionary(); if (dict.joinSyntax == JoinSyntaxes.SYNTAX_TRADITIONAL) throw new MetaDataException(_loc.get("outer-join-support", cls)); }