/** * INTERNAL: * Return the type of the map key, this will be overridden by container policies that allow maps * @return */ public Object getKeyType(){ return keyField.getType(); }
Info(DatabaseField field, boolean isInsert, boolean isInsertModeReturnOnly, boolean isUpdate) { this.field = field; if (field != null) { if (field.getType() != null) { setReferenceClass(field.getType()); } } this.isInsert = isInsert; this.isInsertModeReturnOnly = isInsertModeReturnOnly; this.isUpdate = isUpdate; }
public void setField(DatabaseField field) { this.field = field; if ((field.getType() == null) && (referenceClass != null)) { field.setType(referenceClass); } }
@Override public int getJDBCType(DatabaseField field) { if(Network.class.isAssignableFrom(field.getType())) { return Types.OTHER; } return super.getJDBCType(field); }
@Override public boolean shouldUseCustomModifyForCall(DatabaseField field) { Class type = field.getType(); if ((type != null) && PGobject.class.isAssignableFrom(type)) { return true; } return super.shouldUseCustomModifyForCall(field); }
public void setField(DatabaseField field) { this.field = field; if ((field.getType() == null) && (referenceClass != null)) { field.setType(referenceClass); } }
@Override public boolean shouldUseCustomModifyForCall(DatabaseField field) { return (field.getSqlType() == Types.STRUCT && (typeConverters != null && typeConverters.containsKey(field.getType()))) || super.shouldUseCustomModifyForCall(field); }
public boolean shouldUseCustomModifyForCall(DatabaseField field) { return (field.getSqlType() == Types.STRUCT && (typeConverters != null && typeConverters.containsKey(field.getType()))) || super.shouldUseCustomModifyForCall(field); }
/** * ADVANCED: * Return 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. */ public Class getFieldClassification() { if (getField() == null) { return null; } return getField().getType(); }
/** * ADVANCED: * Return 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. */ public Class getFieldClassification() { if (getField() == null) { return null; } return getField().getType(); }
/** * 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)); } } }
@Override public Expression createExpressionFor(DatabaseField field, Expression builder) { if (field.getType() == java.sql.Clob.class || field.getType() == java.sql.Blob.class) { Expression subExp1 = builder.getField(field); Expression subExp2 = builder.getParameter(field); subExp1 = subExp1.getFunction("dbms_lob.compare", subExp2); return subExp1.equal(0); } return super.createExpressionFor(field, builder); }
public ObjectRelationalDatabaseField(DatabaseField field) { this.setIndex(field.getIndex()); this.setName(field.getName()); this.setTable(field.getTable()); this.setType(field.getType()); this.setUseDelimiters(field.shouldUseDelimiters()); if (field.getType() != null) { this.setTypeName(field.getType().getName()); } this.sqlTypeName = ""; }
/** * 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())); } }