/** * Create a new schema column with information from the given annotation. */ private static Column newColumn(ElementJoinColumn join) { Column col = new Column(); if (!StringUtils.isEmpty(join.name())) col.setName(join.name()); if (!StringUtils.isEmpty(join.columnDefinition())) col.setTypeName(join.columnDefinition()); if (!StringUtils.isEmpty(join.referencedColumnName())) col.setTarget(join.referencedColumnName()); if (!StringUtils.isEmpty(join.referencedAttributeName())) col.setTargetField(join.referencedAttributeName()); col.setNotNull(!join.nullable()); col.setFlag (Column.FLAG_UNINSERTABLE, !join.insertable ()); col.setFlag (Column.FLAG_UNUPDATABLE, !join.updatable ()); return col; }
/** * Create a new schema column with information from the given annotation. */ private Column newColumn(ElementJoinColumn join, boolean delimit) { Column col = new Column(); if (!StringUtils.isEmpty(join.name())) col.setIdentifier(DBIdentifier.newColumn(join.name(), delimit)); if (!StringUtils.isEmpty(join.columnDefinition())) col.setTypeIdentifier(DBIdentifier.newColumnDefinition(join.columnDefinition())); if (!StringUtils.isEmpty(join.referencedColumnName())) setTargetIdentifier(col, join.referencedColumnName()); if (!StringUtils.isEmpty(join.referencedAttributeName())) col.setTargetField(join.referencedAttributeName()); col.setNotNull(!join.nullable()); col.setFlag (Column.FLAG_UNINSERTABLE, !join.insertable ()); col.setFlag (Column.FLAG_UNUPDATABLE, !join.updatable ()); return col; }
/** * Create a new schema column with information from the given annotation. */ private Column newColumn(ElementJoinColumn join, boolean delimit) { Column col = new Column(); if (!StringUtil.isEmpty(join.name())) col.setIdentifier(DBIdentifier.newColumn(join.name(), delimit)); if (!StringUtil.isEmpty(join.columnDefinition())) col.setTypeIdentifier(DBIdentifier.newColumnDefinition(join.columnDefinition())); if (!StringUtil.isEmpty(join.referencedColumnName())) setTargetIdentifier(col, join.referencedColumnName()); if (!StringUtil.isEmpty(join.referencedAttributeName())) col.setTargetField(join.referencedAttributeName()); col.setNotNull(!join.nullable()); col.setFlag (Column.FLAG_UNINSERTABLE, !join.insertable ()); col.setFlag (Column.FLAG_UNUPDATABLE, !join.updatable ()); return col; }
/** * Create a new schema column with information from the given annotation. */ private Column newColumn(ElementJoinColumn join, boolean delimit) { Column col = new Column(); if (!StringUtil.isEmpty(join.name())) col.setIdentifier(DBIdentifier.newColumn(join.name(), delimit)); if (!StringUtil.isEmpty(join.columnDefinition())) col.setTypeIdentifier(DBIdentifier.newColumnDefinition(join.columnDefinition())); if (!StringUtil.isEmpty(join.referencedColumnName())) setTargetIdentifier(col, join.referencedColumnName()); if (!StringUtil.isEmpty(join.referencedAttributeName())) col.setTargetField(join.referencedAttributeName()); col.setNotNull(!join.nullable()); col.setFlag (Column.FLAG_UNINSERTABLE, !join.insertable ()); col.setFlag (Column.FLAG_UNUPDATABLE, !join.updatable ()); return col; }