Examples of TableDefinition


Examples of com.openbravo.data.loader.TableDefinition

    private static Datas[] customerdatas = new Datas[] {Datas.STRING, Datas.TIMESTAMP, Datas.TIMESTAMP, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.INT, Datas.BOOLEAN, Datas.STRING};
   
    public void init(Session s){
       
        this.s = s;
        tcustomers = new TableDefinition(s
            , "CUSTOMERS"
            , new String[] { "ID", "TAXID", "SEARCHKEY", "NAME", "NOTES", "VISIBLE", "CARD", "MAXDEBT", "CURDATE", "CURDEBT"
                           , "FIRSTNAME", "LASTNAME", "EMAIL", "PHONE", "PHONE2", "FAX"
                           , "ADDRESS", "ADDRESS2", "POSTAL", "CITY", "REGION", "COUNTRY"
                           , "TAXCATEGORY" }
View Full Code Here

Examples of com.openbravo.data.loader.TableDefinition

    public DataLogicThirdParties() {
    }
   
    public void init(Session s){

        m_tthirdparties = new TableDefinition(s,
            "THIRDPARTIES"
            , new String[] {"ID", "CIF", "NAME", "ADDRESS", "CONTACTCOMM", "CONTACTFACT", "PAYRULE", "FAXNUMBER", "PHONENUMBER", "MOBILENUMBER", "EMAIL", "WEBPAGE", "NOTES"}
            , new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING}
            , new Formats[] {Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING}
            , new int[] {0}
View Full Code Here

Examples of com.openbravo.data.loader.TableDefinition

    /** Creates a new instance of JPanelFloors */
    public JPanelFloors() {
    }
   
    protected void init() {
        tfloors = new TableDefinition(app.getSession(),
            "FLOORS"
            , new String[] {"ID", "NAME", "IMAGE"}
            , new String[] {"ID", AppLocal.getIntString("Label.Name"), "IMAGE"}
            , new Datas[] {Datas.STRING, Datas.STRING, Datas.IMAGE}
            , new Formats[] {Formats.NULL, Formats.STRING}
View Full Code Here

Examples of com.openbravo.data.loader.TableDefinition

   
    protected void init() {
        DataLogicSales dlSales = null;
        dlSales = (DataLogicSales) app.getBean("com.openbravo.pos.forms.DataLogicSales");
       
        tplaces = new TableDefinition(app.getSession(),
            "PLACES"
            , new String[] {"ID", "NAME", "X", "Y", "FLOOR"}
            , new String[] {"ID", AppLocal.getIntString("Label.Name"), "X", "Y", AppLocal.getIntString("label.placefloor")}
            , new Datas[] {Datas.STRING, Datas.STRING, Datas.INT, Datas.INT, Datas.STRING}
            , new Formats[] {Formats.STRING, Formats.STRING, Formats.INT, Formats.INT, Formats.NULL}
View Full Code Here

Examples of com.openbravo.data.loader.TableDefinition

    }
   
    public void init(Session s){
        this.s = s;
       
        m_tpeople = new TableDefinition(s,
            "PEOPLE"
            , new String[] {"ID", "NAME", "APPPASSWORD", "ROLE", "VISIBLE", "CARD", "IMAGE"}
            , new String[] {"ID", AppLocal.getIntString("label.peoplename"), AppLocal.getIntString("Label.Password"), AppLocal.getIntString("label.role"), AppLocal.getIntString("label.peoplevisible"), AppLocal.getIntString("label.card"), AppLocal.getIntString("label.peopleimage")}
            , new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.BOOLEAN, Datas.STRING, Datas.IMAGE}
            , new Formats[] {Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.BOOLEAN, Formats.STRING, Formats.NULL}
            , new int[] {0}
        );  
       
        m_troles = new TableDefinition(s,
            "ROLES"
            , new String[] {"ID", "NAME", "PERMISSIONS"}
            , new String[] {"ID", AppLocal.getIntString("Label.Name"), "PERMISSIONS"}
            , new Datas[] {Datas.STRING, Datas.STRING, Datas.BYTES}
            , new Formats[] {Formats.STRING, Formats.STRING, Formats.NULL}
            , new int[] {0}
        )
       
        m_tresources = new TableDefinition(s,
            "RESOURCES"
            , new String[] {"ID", "NAME", "RESTYPE", "CONTENT"}
            , new String[] {"ID", AppLocal.getIntString("Label.Name"), AppLocal.getIntString("label.type"), "CONTENT"}
            , new Datas[] {Datas.STRING, Datas.STRING, Datas.INT, Datas.BYTES}
            , new Formats[] {Formats.STRING, Formats.STRING, Formats.INT, Formats.NULL}
View Full Code Here

Examples of com.openbravo.data.loader.TableDefinition

    private static Datas[] customerdatas = new Datas[] {Datas.STRING, Datas.TIMESTAMP, Datas.TIMESTAMP, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.INT, Datas.BOOLEAN, Datas.STRING};
   
    public void init(Session s){
       
        this.s = s;
        tcustomers = new TableDefinition(s
            , "CUSTOMERS"
            , new String[] { "ID", "TAXID", "SEARCHKEY", "NAME", "NOTES", "VISIBLE", "CARD", "MAXDEBT", "CURDATE", "CURDEBT"
                           , "FIRSTNAME", "LASTNAME", "EMAIL", "PHONE", "PHONE2", "FAX"
                           , "ADDRESS", "ADDRESS2", "POSTAL", "CITY", "REGION", "COUNTRY"
                           , "TAXCATEGORY" }
View Full Code Here

Examples of oracle.toplink.essentials.tools.schemaframework.TableDefinition

                                        Collection usedFields,
                                        Collection allFields) throws IOException
    {
        String body = getCreateTempTableSqlBodyForTable(table);
        if(body == null) {
            TableDefinition tableDef = new TableDefinition();
            Collection fields;
            if(supportsLocalTempTables()) {
                fields = usedFields;
            } else {
                // supportsGlobalTempTables() == true
                fields = allFields;
            }
            Iterator itFields = fields.iterator();
            while(itFields.hasNext()) {
                DatabaseField field = (DatabaseField)itFields.next();
                FieldDefinition fieldDef;
                //bug3307, should use columnDefinition if it was defined.
                if(field.getColumnDefinition().length() == 0){
                   fieldDef = new FieldDefinition(field.getName(), ConversionManager.getObjectClass(field.getType()));
                }else{
                   fieldDef = new FieldDefinition(field.getName(), field.getColumnDefinition());
                }
                if(pkFields.contains(field) && shouldTempTableSpecifyPrimaryKeys()) {
                    fieldDef.setIsPrimaryKey(true);
                }
                tableDef.addField(fieldDef);
            }           
            tableDef.setCreationPrefix(getCreateTempTableSqlPrefix());
            tableDef.setName(getTempTableForTable(table).getQualifiedName());
            tableDef.setCreationSuffix(getCreateTempTableSqlSuffix());
            tableDef.buildCreationWriter(session, writer);
        } else {
            writer.write(getCreateTempTableSqlPrefix());
            writer.write(getTempTableForTable(table).getQualifiedName());
            writer.write(body);
            writer.write(getCreateTempTableSqlSuffix());
View Full Code Here

Examples of org.eclipse.persistence.tools.schemaframework.TableDefinition

                                          List<DBAccessor.DBColumnInfo> columns,
                                          List<String> primaryKeyColumns) {
    //TODO validateNames(String tableName, List<DBAccessor.DBColumnInfo> columns)
    //TODO validatePKNames(List<DBAccessor.DBColumnInfo> columns, String... primaryKeyColumns)

    TableDefinition tableDefinition = new TableDefinition();
    tableDefinition.setName(tableName);
    for (DBAccessor.DBColumnInfo columnInfo : columns) {
      //TODO case-sensitive for now
      int length = columnInfo.getLength() != null ? columnInfo.getLength() : 0;

      if (primaryKeyColumns.contains(columnInfo.getName())) {
        tableDefinition.addIdentityField(columnInfo.getName(), columnInfo.getType(), length);
      } else {
        FieldDefinition fieldDefinition = convertToFieldDefinition(columnInfo);
        tableDefinition.addField(fieldDefinition);
      }
    }

    //TODO possibly move code to avoid unnecessary dependencies and allow extension
    tableDefinition.buildCreationWriter(createStubAbstractSessionFromPlatform(databasePlatform), writer);

    return writer;
  }
View Full Code Here

Examples of org.eclipse.persistence.tools.schemaframework.TableDefinition

    foreignKeyConstraint.setName(constraintName);
    foreignKeyConstraint.setTargetTable(referenceTableName);
    foreignKeyConstraint.setSourceFields(keyColumns);
    foreignKeyConstraint.setTargetFields(referenceColumns);

    TableDefinition tableDefinition = new TableDefinition();
    tableDefinition.setName(tableName);

    Writer writer = new StringWriter();
    tableDefinition.buildConstraintCreationWriter(createStubAbstractSessionFromPlatform(databasePlatform),
        foreignKeyConstraint, writer);

    return writer.toString();

  }
View Full Code Here

Examples of org.eclipse.persistence.tools.schemaframework.TableDefinition

  @Override
  public String getAddColumnStatement(String tableName, DBAccessor.DBColumnInfo columnInfo) {
    Writer writer = new StringWriter();

    TableDefinition tableDefinition = new TableDefinition();
    tableDefinition.setName(tableName);
    tableDefinition.buildAddFieldWriter(createStubAbstractSessionFromPlatform(databasePlatform),
        convertToFieldDefinition(columnInfo), writer);

    return writer.toString();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.