/** * INTERNAL: * Return all the source key fields associated with the mapping. */ public Vector<DatabaseField> getSourceKeyFields() { return this.mechanism.getSourceKeyFields(); }
/** * INTERNAL: * Return all the source key fields associated with the mapping. */ public Vector<DatabaseField> getSourceKeyFields() { return this.mechanism.getSourceKeyFields(); }
/** * INTERNAL: * Return all the source key fields associated with the mapping. */ public Vector<DatabaseField> getSourceKeyFields() { return this.mechanism.getSourceKeyFields(); }
/** * INTERNAL: * Checks if a single source key was specified. */ protected boolean isSingleSourceRelationKeySpecified() { return getSourceKeyFields().isEmpty(); }
/** * INTERNAL: * Checks if a single source key was specified. */ protected boolean isSingleSourceRelationKeySpecified() { return getSourceKeyFields().isEmpty(); }
/** * INTERNAL: * This method is used to store the FK fields that can be cached that correspond to noncacheable mappings * the FK field values will be used to re-issue the query when cloning the shared cache entity */ protected void collectQueryParameters(Set<DatabaseField> cacheFields){ for (DatabaseField field : getSourceKeyFields()) { cacheFields.add(field); } }
/** * INTERNAL: * This method is used to store the FK fields that can be cached that correspond to noncacheable mappings * the FK field values will be used to re-issue the query when cloning the shared cache entity */ protected void collectQueryParameters(Set<DatabaseField> cacheFields){ for (DatabaseField field : getSourceKeyFields()) { cacheFields.add(field); } }
/** * INTERNAL: * Checks if a single source key was specified. */ protected boolean isSingleSourceRelationKeySpecified() { return getSourceKeyFields().isEmpty(); }
/** * INTERNAL: * All the source key field names are converted to DatabaseField and stored. */ protected void initializeSourceKeys(AbstractSession session, ForeignReferenceMapping mapping) { for (int index = 0; index < getSourceKeyFields().size(); index++) { DatabaseField field = mapping.getDescriptor().buildField(getSourceKeyFields().get(index)); getSourceKeyFields().set(index, field); } }
/** * PUBLIC: * Return the source key field names associated with the mapping. * These are in-order with the sourceRelationKeyFieldNames. */ public Vector getSourceKeyFieldNames() { Vector fieldNames = new Vector(getSourceKeyFields().size()); for (Enumeration fieldsEnum = getSourceKeyFields().elements(); fieldsEnum.hasMoreElements();) { fieldNames.addElement(((DatabaseField)fieldsEnum.nextElement()).getQualifiedName()); } return fieldNames; }
/** * PUBLIC: * Return the source key field names associated with the mapping. * These are in-order with the sourceRelationKeyFieldNames. */ public Vector getSourceKeyFieldNames() { Vector fieldNames = new Vector(getSourceKeyFields().size()); for (Enumeration fieldsEnum = getSourceKeyFields().elements(); fieldsEnum.hasMoreElements();) { fieldNames.addElement(((DatabaseField)fieldsEnum.nextElement()).getQualifiedName()); } return fieldNames; }
/** * PUBLIC: * Add the fields in the intermediate table that corresponds to the primary * key in the source table. This method is used if the keys are composite. */ public void addSourceRelationKeyField(DatabaseField sourceRelationKeyField, DatabaseField sourcePrimaryKeyField) { getSourceRelationKeyFields().addElement(sourceRelationKeyField); getSourceKeyFields().addElement(sourcePrimaryKeyField); }
/** * INTERNAL: * Return source key fields for translation by an AggregateObjectMapping */ @Override public Collection getFieldsForTranslationInAggregate() { return getRelationTableMechanism().getSourceKeyFields(); }
/** * PUBLIC: * Add the fields in the intermediate table that corresponds to the primary * key in the source table. This method is used if the keys are composite. */ public void addSourceRelationKeyField(DatabaseField sourceRelationKeyField, DatabaseField sourcePrimaryKeyField) { getSourceRelationKeyFields().addElement(sourceRelationKeyField); getSourceKeyFields().addElement(sourcePrimaryKeyField); }
/** * PUBLIC: * Add the fields in the intermediate table that corresponds to the primary * key in the source table. This method is used if the keys are composite. */ public void addSourceRelationKeyField(DatabaseField sourceRelationKeyField, DatabaseField sourcePrimaryKeyField) { getSourceRelationKeyFields().addElement(sourceRelationKeyField); getSourceKeyFields().addElement(sourcePrimaryKeyField); }
/** * INTERNAL: * Return source key fields for translation by an AggregateObjectMapping */ @Override public Collection getFieldsForTranslationInAggregate() { return getRelationTableMechanism().getSourceKeyFields(); }
/** * INTERNAL: * All the source key field names are converted to DatabaseField and stored. */ protected void initializeSourceKeys(ForeignReferenceMapping mapping) { for (int index = 0; index < getSourceKeyFields().size(); index++) { DatabaseField field = mapping.getDescriptor().buildField(getSourceKeyFields().get(index)); if (((ForeignReferenceMapping)mapping).usesIndirection()) { field.setKeepInRow(true); } getSourceKeyFields().set(index, field); } }
/** * INTERNAL: * If a user does not specify the source key then the primary keys of the source table are used. */ protected void initializeSourceKeysWithDefaults(AbstractSession session, DatabaseMapping mapping) { List<DatabaseField> primaryKeyFields = mapping.getDescriptor().getPrimaryKeyFields(); for (int index = 0; index < primaryKeyFields.size(); index++) { getSourceKeyFields().addElement(primaryKeyFields.get(index)); } }
/** * INTERNAL: * If a user does not specify the source key then the primary keys of the source table are used. */ protected void initializeSourceKeysWithDefaults(DatabaseMapping mapping) { List<DatabaseField> primaryKeyFields = mapping.getDescriptor().getPrimaryKeyFields(); for (int index = 0; index < primaryKeyFields.size(); index++) { DatabaseField field = primaryKeyFields.get(index); if (((ForeignReferenceMapping)mapping).usesIndirection()) { field.setKeepInRow(true); } getSourceKeyFields().addElement(field); } }
/** * INTERNAL: * If a user does not specify the source key then the primary keys of the source table are used. */ protected void initializeSourceKeysWithDefaults(DatabaseMapping mapping) { List<DatabaseField> primaryKeyFields = mapping.getDescriptor().getPrimaryKeyFields(); for (int index = 0; index < primaryKeyFields.size(); index++) { DatabaseField field = primaryKeyFields.get(index); if (((ForeignReferenceMapping)mapping).usesIndirection()) { field.setKeepInRow(true); } getSourceKeyFields().addElement(field); } }