Search in sources :

Example 21 with ColumnInfo

use of com.servoy.j2db.persistence.ColumnInfo in project servoy-client by Servoy.

the class DatabaseUtils method updateColumnInfo.

public static void updateColumnInfo(IPersistFactory persistFactory, Column c, ColumnInfoDef cid) throws RepositoryException {
    int element_id = persistFactory.getNewElementID(null);
    ColumnInfo ci = new ColumnInfo(element_id, true);
    ci.setAutoEnterType(cid.autoEnterType);
    ci.setAutoEnterSubType(cid.autoEnterSubType);
    ci.setSequenceStepSize(cid.sequenceStepSize);
    ci.setPreSequenceChars(cid.preSequenceChars);
    ci.setPostSequenceChars(cid.postSequenceChars);
    ci.setDefaultValue(cid.defaultValue);
    ci.setLookupValue(cid.lookupValue);
    ci.setDatabaseSequenceName(cid.databaseSequenceName);
    ci.setTitleText(cid.titleText);
    ci.setDescription(cid.description);
    ci.setForeignType(cid.foreignType);
    ci.setConverterName(cid.converterName);
    ci.setConverterProperties(cid.converterProperties);
    ci.setValidatorProperties(cid.validatorProperties);
    ci.setValidatorName(cid.validatorName);
    ci.setDefaultFormat(cid.defaultFormat);
    ci.setElementTemplateProperties(cid.elementTemplateProperties);
    ci.setDataProviderID(cid.dataProviderID);
    ci.setContainsMetaData(cid.containsMetaData);
    ci.setConfiguredColumnType(cid.columnType);
    ci.setCompatibleColumnTypes(cid.compatibleColumnTypes);
    ci.setFlags(cid.flags);
    c.setDatabasePK((cid.flags & IBaseColumn.PK_COLUMN) != 0);
    c.setColumnInfo(ci);
}
Also used : ColumnInfo(com.servoy.j2db.persistence.ColumnInfo)

Aggregations

ColumnInfo (com.servoy.j2db.persistence.ColumnInfo)21 Column (com.servoy.j2db.persistence.Column)14 RepositoryException (com.servoy.j2db.persistence.RepositoryException)9 IBaseColumn (com.servoy.base.persistence.IBaseColumn)8 IColumn (com.servoy.j2db.persistence.IColumn)8 IOException (java.io.IOException)6 ITable (com.servoy.j2db.persistence.ITable)5 QueryColumn (com.servoy.j2db.query.QueryColumn)5 IDataProvider (com.servoy.j2db.persistence.IDataProvider)4 Table (com.servoy.j2db.persistence.Table)4 ServoyException (com.servoy.j2db.util.ServoyException)4 ArrayList (java.util.ArrayList)4 IServer (com.servoy.j2db.persistence.IServer)3 Placeholder (com.servoy.j2db.query.Placeholder)3 QuerySelect (com.servoy.j2db.query.QuerySelect)3 QueryTable (com.servoy.j2db.query.QueryTable)3 TablePlaceholderKey (com.servoy.j2db.query.TablePlaceholderKey)3 SafeArrayList (com.servoy.j2db.util.SafeArrayList)3 RemoteException (java.rmi.RemoteException)3 BaseQueryColumn (com.servoy.base.query.BaseQueryColumn)2