private Column dayColumn(String name) { Column c = new Column(); c.setName(name + "_day"); c.setType(Types.DATE); c.setJavaType(JavaTypes.DATE); return c; }
private Column timeColumn(String name) { Column c = new Column(); c.setName(name); c.setType(Types.TIME); c.setJavaType(JavaTypes.DATE); return c; }
/** Copy information from the given column to this one. */ public void copy(Column from) { if (from == null) return; if (DBIdentifier.isNull(getIdentifier())) setIdentifier(from.getIdentifier()); if (getType() == Types.OTHER) setType(from.getType()); if (DBIdentifier.isNull(getTypeIdentifier())) setTypeIdentifier(from.getTypeIdentifier()); if (getJavaType() == JavaTypes.OBJECT) setJavaType(from.getJavaType()); if (getSize() == 0) setSize(from.getSize()); if (getDecimalDigits() == 0) setDecimalDigits(from.getDecimalDigits()); if (getDefaultString() == null) setDefaultString(from.getDefaultString()); if (!isNotNullExplicit() && from.isNotNullExplicit()) setNotNull(from.isNotNull()); if (!isAutoAssigned()) setAutoAssigned(from.isAutoAssigned()); if (!isRelationId()) setRelationId(from.isRelationId()); if (!isImplicitRelation()) setImplicitRelation(from.isRelationId()); if (DBIdentifier.isNull(getTargetIdentifier())) setTargetIdentifier(from.getTargetIdentifier()); if (getTargetField() == null) setTargetField(from.getTargetField()); if (_flags == 0) _flags = from._flags; if (!isXML()) setXML(from.isXML()); if (!isUni1MFK()) setUni1MFK(from.isUni1MFK()); for (Constraint c : _constraints) { addConstraint(c); } }