/** * ADVANCED: * @see #setStartFieldType */ public void setEndFieldType(String fieldName, Class type) { for (DatabaseField existing : endFields) { existing.setType(type); } }
/** * ADVANCED: * Sets the type of all start fields. Not required to be set as the default * of Timestamp is assumed. */ public void setStartFieldType(Class type) { for (DatabaseField existing : startFields) { existing.setType(type); } }
/** * ADVANCED: * @see #setStartFieldType */ public void setEndFieldType(String fieldName, Class type) { for (DatabaseField existing : endFields) { existing.setType(type); } }
/** * 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); }
/** * INTERNAL: */ protected DatabaseField createField(String qualifiedName, Class type) { DatabaseField field = new DatabaseField(qualifiedName); field.setType(type); return field; }
/** * 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 setFieldClassification(Class fieldType) { getField().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); }
/** * 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 setDirectFieldClassification(Class fieldType) { getDirectField().setType(fieldType); }
/** * INTERNAL: */ protected DatabaseField createField(String qualifiedName, Class type) { DatabaseField field = new DatabaseField(qualifiedName); field.setType(type); return field; }
/** * 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 setFieldClassification(Class fieldType) { getField().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 setDirectFieldClassification(Class fieldType) { getDirectField().setType(fieldType); }
public void setField(DatabaseField field) { this.field = field; if ((field.getType() == null) && (referenceClass != null)) { field.setType(referenceClass); } }
/** * PUBLIC: * Define the field name to be substitute for the function return. * The type is the type of Java class desired back from the function, this is dependent on the type returned from the function. */ public void setResult(String name, Class type) { DatabaseField returnField = (DatabaseField)getParameters().get(0); returnField.setName(name); returnField.setType(type); }
private void setDatabaseFieldParameters(Session session, DatabaseField field) { if (session.getPlatform() instanceof PostgreSQLPlatform) { field.setSqlType(Types.OTHER); field.setType(UUID.class); } else { field.setSqlType(Types.VARCHAR); field.setType(String.class); } field.setColumnDefinition("UUID"); }
/** * PUBLIC: * This method should only be used with custom SQL: * it sets a type to IN, OUT or INOUT parameter (prefixed with #, ### or #### in custom SQL string). */ public void setCustomSQLArgumentType(String customParameterName, Class type) { DatabaseField field = new DatabaseField(customParameterName); field.setType(type); getParameters().add(field); getParameterTypes().add(null); }
/** * INTERNAL: * Need to set the field type for the foreign key fields for a map key, as the fields are not contained in any descriptor. */ public void postInitializeMapKey(MappedKeyMapContainerPolicy policy) { for (DatabaseField foreignKey : getSourceToTargetKeyFields().keySet()) { if (foreignKey.getType() == null) { foreignKey.setType(getFieldClassification(foreignKey)); } } }
/** * INTERNAL: * Making any mapping changes necessary to use a the mapping as a map key after initializing the mapping. */ public void postInitializeMapKey(MappedKeyMapContainerPolicy policy) { if (getField().getType() == null) { getField().setType(getFieldClassification(getField())); } }
/** * INTERNAL: * Making any mapping changes necessary to use a the mapping as a map key after initializing the mapping. */ public void postInitializeMapKey(MappedKeyMapContainerPolicy policy) { if (getField().getType() == null) { getField().setType(getFieldClassification(getField())); } }
/** * INTERNAL: * Initialize the mapping. */ @Override public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (this.getField() instanceof XMLField && getValueConverter() instanceof TypeConversionConverter) { TypeConversionConverter converter = (TypeConversionConverter)getValueConverter(); this.getField().setType(converter.getObjectClass()); } }
/** * INTERNAL: * Initialize the mapping. */ @Override public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (this.getField() instanceof XMLField && getValueConverter() instanceof TypeConversionConverter) { TypeConversionConverter converter = (TypeConversionConverter)getValueConverter(); this.getField().setType(converter.getObjectClass()); } }