@Override public void convertClassNamesToClasses(ClassLoader classLoader) { super.convertClassNamesToClasses(classLoader); if (getDirectKeyField() != null) { getDirectKeyField().convertClassNamesToClasses(classLoader); } }
/** * ADVANCED: * Set the class type name of the field value. * This can be used if field value differs from the object value, * has specific typing requirements such as usage of java.sql.Blob or NChar. * This must be called after the direct key field has been set. */ public void setDirectKeyFieldClassificationName(String fieldTypeName) { getDirectKeyField().setTypeName(fieldTypeName); }
/** * ADVANCED: * Set the class type of the field value. * This can be used if field value differs from the object value, * has specific typing requirements such as usage of java.sql.Blob or NChar. * This must be called after the field name has been set. */ public void setDirectKeyFieldClassification(Class fieldType) { getDirectKeyField().setType(fieldType); }
/** * ADVANCED: * Set the class type name of the field value. * This can be used if field value differs from the object value, * has specific typing requirements such as usage of java.sql.Blob or NChar. * This must be called after the direct key field has been set. */ public void setDirectKeyFieldClassificationName(String fieldTypeName) { getDirectKeyField().setTypeName(fieldTypeName); }
@Override public void convertClassNamesToClasses(ClassLoader classLoader) { super.convertClassNamesToClasses(classLoader); if (getDirectKeyField() != null) { getDirectKeyField().convertClassNamesToClasses(classLoader); } }
/** * ADVANCED: * Set the class type of the field value. * This can be used if field value differs from the object value, * has specific typing requirements such as usage of java.sql.Blob or NChar. * This must be called after the field name has been set. */ public void setDirectKeyFieldClassification(Class fieldType) { getDirectKeyField().setType(fieldType); }
/** * ADVANCED: * Set the class type of the field value. * This can be used if field value differs from the object value, * has specific typing requirements such as usage of java.sql.Blob or NChar. * This must be called after the field name has been set. */ public void setDirectKeyFieldClassification(Class fieldType) { getDirectKeyField().setType(fieldType); }
protected void addDirectMapMappingLines(NonreflectiveMethodDefinition method, String mappingName, DirectMapMapping mapping) { DatabaseField directKeyField = mapping.getDirectKeyField(); if(directKeyField != null) { method.addLine(mappingName + ".setDirectKeyFieldName(\"" + directKeyField.getQualifiedName() + "\");"); } Converter converter = mapping.getKeyConverter(); if (converter != null) { addConverterLines(method, mappingName + "KeyConverter", converter); method.addLine(mappingName + ".setKeyConverter(" + mappingName + "KeyConverter" + ");"); } }
protected void addDirectMapMappingLines(NonreflectiveMethodDefinition method, String mappingName, DirectMapMapping mapping) { DatabaseField directKeyField = mapping.getDirectKeyField(); if(directKeyField != null) { method.addLine(mappingName + ".setDirectKeyFieldName(\"" + directKeyField.getQualifiedName() + "\");"); } Converter converter = mapping.getKeyConverter(); if (converter != null) { addConverterLines(method, mappingName + "KeyConverter", converter); method.addLine(mappingName + ".setKeyConverter(" + mappingName + "KeyConverter" + ");"); } }
protected void addDirectMapMappingLines(NonreflectiveMethodDefinition method, String mappingName, DirectMapMapping mapping) { method.addLine(mappingName + ".setDirectKeyFieldName(\"" + mapping.getDirectKeyField().getQualifiedName() + "\");"); Converter converter = mapping.getKeyConverter(); if (converter != null) { addConverterLines(method, mappingName + "KeyConverter", converter); method.addLine(mappingName + ".setKeyConverter(" + mappingName + "KeyConverter" + ");"); } }
dbField = ((DirectMapMapping) mapping).getDirectKeyField(); fieldDef = getFieldDefFromDBField(dbField); if (!table.getFields().contains(fieldDef)) {
dbField = ((DirectMapMapping) mapping).getDirectKeyField(); fieldDef = getFieldDefFromDBField(dbField); if (!table.getFields().contains(fieldDef)) {
/** * Build direct collection table definitions in a EclipseLink descriptor */ private void buildDirectCollectionTableDefinition(DirectCollectionMapping mapping, ClassDescriptor desc) { //first create direct collection table TableDefinition tblDef = getTableDefFromDBTable(mapping.getReferenceTable()); DatabaseField dbField = null; //add the table reference key(s) Vector refPkFields = mapping.getReferenceKeyFields(); for (int index = 0; index < refPkFields.size(); index++) { dbField = resolveDatabaseField((DatabaseField) refPkFields.get(index), mapping.getSourceKeyFields().get(index)); tblDef.addField(getDirectCollectionReferenceKeyFieldDefFromDBField(dbField)); } //add the direct collection field to the table. tblDef.addField(getFieldDefFromDBField(mapping.getDirectField(), false)); //if the mapping is direct-map field, add the direct key field to the table as well. // TODO: avoid generating DDL for map key mappings for the time being. // Bug: 270814 if (mapping.isDirectMapMapping() && ! mapping.getContainerPolicy().isMappedKeyMapPolicy() ) { dbField = ((DirectMapMapping) mapping).getDirectKeyField(); tblDef.addField(getFieldDefFromDBField(dbField, false)); } else { addFieldsForMappedKeyMapContainerPolicy(mapping.getContainerPolicy(), tblDef); if(mapping.getListOrderField() != null) { tblDef.addField(getFieldDefFromDBField(mapping.getListOrderField(), false)); } } }
statement.addField((DatabaseField)getDirectField().clone()); if (isDirectMapMapping()) { statement.addField((DatabaseField)((DirectMapMapping)this).getDirectKeyField().clone());
statement.addField(getDirectField().clone()); if (isDirectMapMapping()) { statement.addField(((DirectMapMapping)this).getDirectKeyField().clone());
statement.addField(getDirectField().clone()); if (isDirectMapMapping()) { statement.addField(((DirectMapMapping)this).getDirectKeyField().clone());