/** * PUBLIC: * Create a new VersionLockingPolicy. Defaults to * storing the lock value in the cache. * @param fieldName specifies the field name for the write * lock field. */ public VersionLockingPolicy(String fieldName) { this(new DatabaseField(fieldName)); }
/** * INTERNAL: * Add the multiple table fields, if is a foreign key then add the tables to the * foreign keys ordering. */ protected void addMultipleTableForeignKeys(String fieldNameInSourceTable, String fieldNameInTargetTable, boolean isForeignKey) throws DescriptorException { addMultipleTableForeignKeys(new DatabaseField(fieldNameInSourceTable), new DatabaseField(fieldNameInTargetTable), isForeignKey); }
/** * PUBLIC: * This protocol can be used to map the primary key field names in a * multiple table descriptor. By default TopLink assumes that all of the * primary key fields are named the same. */ public void addMultipleTablePrimaryKeyFieldName(String sourceFieldName, String targetFieldName) throws DescriptorException { addMultipleTablePrimaryKeyField(new DatabaseField(sourceFieldName), new DatabaseField(targetFieldName)); }
/** * PUBLIC: * Add the name of the reference key field. * This is used for composite reference keys. * This is the foreign key field in the direct table referencing the primary key of the source object. * Both the reference field name and the name of the source field that it references must be provided. */ public void addReferenceKeyFieldName(String referenceForeignKeyFieldName, String sourcePrimaryKeyFieldName) { addReferenceKeyField(new DatabaseField(referenceForeignKeyFieldName), new DatabaseField(sourcePrimaryKeyFieldName)); }
/** * INTERNAL: * Remove the field key from the row. */ public Object remove(String fieldName) { return remove(new DatabaseField(fieldName)); }
/** * PUBLIC: * Set the source key field in the relation table. * This is the name of the foreign key in the relation table to the source's primary key field. * This method is used if the source primary key is a singleton only. */ public void setSourceRelationKeyFieldName(String sourceRelationKeyFieldName) { getSourceRelationKeyFields().addElement(new DatabaseField(sourceRelationKeyFieldName)); }
/** * PUBLIC: * Set the target key field in the relation table. * This is the name of the foreign key in the relation table to the target's primary key field. * This method is used if the target's primary key is a singleton only. */ public void setTargetRelationKeyFieldName(String targetRelationKeyFieldName) { getTargetRelationKeyFields().addElement(new DatabaseField(targetRelationKeyFieldName)); }
/** * PUBLIC: * Set the direct field name in the reference table. * This is the field that the primitive data value is stored in. */ public void setDirectFieldName(String fieldName) { setDirectField(new DatabaseField(fieldName)); }
/** * PUBLIC: * Set the field name in the mapping. */ public void setFieldName(String FieldName) { setField(new DatabaseField(FieldName)); }
public Expression getField(String fieldName) { DatabaseField field = new DatabaseField(fieldName); return getField(field); }
/** * INTERNAL: * Set the source key field names associated with the mapping. * These must be in-order with the targetForeignKeyFieldNames. */ public void setSourceKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setSourceKeyFields(fields); }
/** * INTERNAL: * Set the source key field names associated with the mapping. * These must be in-order with the referenceKeyFieldNames. */ public void setSourceKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setSourceKeyFields(fields); }
/** * PUBLIC: * Set the target foregin key field names associated with the mapping. * These must be in-order with the sourceKeyFieldNames. */ public void setTargetForeignKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setTargetForeignKeyFields(fields); }
/** * INTERNAL: * Set the target key field names associated with the mapping. * These must be in-order with the targetRelationKeyFieldNames. */ public void setTargetKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setTargetKeyFields(fields); }
/** * INTERNAL: * Set the target relation key field names associated with the mapping. * These must be in-order with the targetKeyFieldNames. */ public void setTargetRelationKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setTargetRelationKeyFields(fields); }
/** * PUBLIC: * Return the foreign key field names associated with the mapping. * These are only the source fields that are writable. */ public void setForeignKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setForeignKeyFields(fields); }
/** * PUBLIC: * Set the source relation key field names associated with the mapping. * These must be in-order with the sourceKeyFieldNames. */ public void setSourceRelationKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setSourceRelationKeyFields(fields); }
/** * PUBLIC: * To set the class indicator field name. * This is the name of the field in the table that stores what type of object this is. */ public void setClassIndicatorFieldName(String fieldName) { if (fieldName == null) { setClassIndicatorField(null); } else { setClassIndicatorField(new DatabaseField(fieldName)); } }
/** * PUBLIC: * Check if the field is contained in the row. */ public boolean containsKey(String fieldName) { // Optimized the field creation. if (this.lookupField == null) { this.lookupField = new DatabaseField(fieldName); } else { this.lookupField.resetQualifiedName(fieldName); } return containsKey(this.lookupField); }
/** * INTERNAL: */ protected MetadataPrimaryKeyJoinColumn(String sourceTableName, String targetTableName, String defaultPKFieldName, String defaultFKFieldName) { m_pkField = new DatabaseField(); m_pkField.setName(defaultPKFieldName); m_pkField.setTableName(sourceTableName); m_fkField = new DatabaseField(); m_fkField.setName(defaultFKFieldName); m_fkField.setTableName(targetTableName); m_fkField.setColumnDefinition(DEFAULT_COLUMN_DEFINITION); }