Package org.apache.torque.map

Examples of org.apache.torque.map.TableMap


    public void testOrderBy() throws TorqueException
    {
        // we need a rudimentary databaseMap for this test case to work
        DatabaseMap dbMap = Torque.getDatabaseMap(Torque.getDefaultDB());

        TableMap tableMap = new TableMap("AUTHOR", dbMap);
        dbMap.addTable(tableMap);

        ColumnMap columnMap = new ColumnMap("NAME", tableMap);
        columnMap.setType("");
        tableMap.addColumn(columnMap);

        columnMap = new ColumnMap("AUTHOR_ID", tableMap);
        columnMap.setType(new Integer(0));
        tableMap.addColumn(columnMap);

        // check that alias'ed tables are referenced by their alias
        // name when added to the select clause.
        Criteria criteria = new Criteria();
        criteria.addSelectColumn("AUTHOR.NAME");
View Full Code Here


            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_REPOSITORIES");
        TableMap tMap = dbMap.getTable("OSLCM_REPOSITORIES");
        tMap.setJavaName("Repository");
        tMap.setOMClass( org.oslcm.om.Repository.class );
        tMap.setPeerClass( org.oslcm.om.RepositoryPeer.class );
        tMap.setDescription("Tabla repositorios");
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID_REPOSITORY --------------------
        cMap = new ColumnMap( "ID_REPOSITORY", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdRepository" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
            cMap.setDescription("Codigo unico repositorio");
              cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: TYPE --------------------
        cMap = new ColumnMap( "TYPE", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "CHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Type" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Tipo de repositorio: CV => CVS, SV => Subversion");
              cMap.setInheritance("false");
                cMap.setSize( 2 );
                  cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: USER --------------------
        cMap = new ColumnMap( "USER", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "User" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Usuario con permisos rw para conectarse al repositorio");
              cMap.setInheritance("false");
                cMap.setSize( 15 );
                  cMap.setPosition(3);
          tMap.addColumn(cMap);
    // ------------- Column: PASSWORD --------------------
        cMap = new ColumnMap( "PASSWORD", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "CHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Password" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Contrase�a para la conexion al repositorio");
              cMap.setInheritance("false");
                cMap.setSize( 50 );
                  cMap.setPosition(4);
          tMap.addColumn(cMap);
    // ------------- Column: URL --------------------
        cMap = new ColumnMap( "URL", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Url" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Url para la conexion al reposotiro");
              cMap.setInheritance("false");
                cMap.setSize( 200 );
                  cMap.setPosition(5);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_DOCUMENTS");
        TableMap tMap = dbMap.getTable("OSLCM_DOCUMENTS");
        tMap.setJavaName("Document");
        tMap.setOMClass( org.oslcm.om.Document.class );
        tMap.setPeerClass( org.oslcm.om.DocumentPeer.class );
        tMap.setDescription("Documentos del sistema");
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID_DOCUMENT --------------------
        cMap = new ColumnMap( "ID_DOCUMENT", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdDocument" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
            cMap.setDescription("Codigo unico del documento");
              cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: TYPE --------------------
        cMap = new ColumnMap( "TYPE", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Type" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("A que corresponde el documento. (Tabla)");
              cMap.setInheritance("false");
                    cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: ID_TYPE --------------------
        cMap = new ColumnMap( "ID_TYPE", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdType" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("codigo de tabla");
              cMap.setInheritance("false");
                    cMap.setPosition(3);
          tMap.addColumn(cMap);
    // ------------- Column: TYPE_DOC --------------------
        cMap = new ColumnMap( "TYPE_DOC", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "CHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "TypeDoc" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Tipo doducmento.");
              cMap.setInheritance("false");
                cMap.setSize( 1 );
                  cMap.setPosition(4);
          tMap.addColumn(cMap);
    // ------------- Column: URL_DOC --------------------
        cMap = new ColumnMap( "URL_DOC", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "Url" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Situacion del documento");
              cMap.setInheritance("false");
                cMap.setSize( 255 );
                  cMap.setPosition(5);
          tMap.addColumn(cMap);
    // ------------- Column: ID_DOC --------------------
        cMap = new ColumnMap( "ID_DOC", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "IdDoc" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("El documento puede ser un texto escrito. Se guarda en base de datos");
            cMap.setDefault("0");
            cMap.setInheritance("false");
                    cMap.setPosition(6);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_REVISIONS");
        TableMap tMap = dbMap.getTable("OSLCM_REVISIONS");
        tMap.setJavaName("Revision");
        tMap.setOMClass( org.oslcm.om.Revision.class );
        tMap.setPeerClass( org.oslcm.om.RevisionPeer.class );
        tMap.setDescription("Revision de una aplicacion");
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID_REVISION --------------------
        cMap = new ColumnMap( "ID_REVISION", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdRevision" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
            cMap.setDescription("Codigo unico de la revision");
              cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: ID_APPLICATION --------------------
        cMap = new ColumnMap( "ID_APPLICATION", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdApplication" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Aplicacion a la que le corresponde la revision");
              cMap.setInheritance("false");
                  cMap.setForeignKey("OSLCM_APPLICATIONS", "ID_APPLICATION");
            cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: TYPE --------------------
        cMap = new ColumnMap( "TYPE", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "CHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Type" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Tipo de revision. S => Snapshoot, T => Tag, B => Branch, H => Head/trunk");
              cMap.setInheritance("false");
                cMap.setSize( 1 );
                  cMap.setPosition(3);
          tMap.addColumn(cMap);
    // ------------- Column: TAG --------------------
        cMap = new ColumnMap( "TAG", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "Tag" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Nombre del tag. No tiene restricciones por DB. Puede ser HEAD (o trunk). En branch se pone un tag");
              cMap.setInheritance("false");
                cMap.setSize( 100 );
                  cMap.setPosition(4);
          tMap.addColumn(cMap);
    // ------------- Column: REVISION_NUM --------------------
        cMap = new ColumnMap( "REVISION_NUM", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "RevisionNum" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Corresponde a un codigo de transaccion en subverion. Se usa para el snapshoot y head");
              cMap.setInheritance("false");
                    cMap.setPosition(5);
          tMap.addColumn(cMap);
    // ------------- Column: DATESNAP --------------------
        cMap = new ColumnMap( "DATESNAP", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "DateSnap" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Corresponde a un codigo de fecha en cvs. Se usa para el snapshoot");
              cMap.setInheritance("false");
                cMap.setSize( 30 );
                  cMap.setPosition(6);
          tMap.addColumn(cMap);
    // ------------- Column: ARCHIVED --------------------
        cMap = new ColumnMap( "ARCHIVED", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Archived" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Si vale 1 el registro esta archivado");
            cMap.setDefault("0");
            cMap.setInheritance("false");
                    cMap.setPosition(7);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_ISSUES");
        TableMap tMap = dbMap.getTable("OSLCM_ISSUES");
        tMap.setJavaName("Issue");
        tMap.setOMClass( org.oslcm.om.Issue.class );
        tMap.setPeerClass( org.oslcm.om.IssuePeer.class );
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID --------------------
        cMap = new ColumnMap( "ID", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "Id" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
                cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: ID_ISSUE --------------------
        cMap = new ColumnMap( "ID_ISSUE", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdIssue" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Codigo de la issue que genera el programa de gestion de incidencias");
              cMap.setInheritance("false");
                    cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: TYPE --------------------
        cMap = new ColumnMap( "TYPE", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Type" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("A que corresponde la issue. (Tabla)");
              cMap.setInheritance("false");
                    cMap.setPosition(3);
          tMap.addColumn(cMap);
    // ------------- Column: ID_TYPE --------------------
        cMap = new ColumnMap( "ID_TYPE", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdType" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("codigo de tabla");
              cMap.setInheritance("false");
                    cMap.setPosition(4);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_APP_ENV");
        TableMap tMap = dbMap.getTable("OSLCM_APP_ENV");
        tMap.setJavaName("Appenv");
        tMap.setOMClass( org.oslcm.om.Appenv.class );
        tMap.setPeerClass( org.oslcm.om.AppenvPeer.class );
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID --------------------
        cMap = new ColumnMap( "ID", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "Id" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
                cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: ID_APPLICATION --------------------
        cMap = new ColumnMap( "ID_APPLICATION", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdApplication" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
                cMap.setInheritance("false");
                  cMap.setForeignKey("OSLCM_APPLICATIONS", "ID_APPLICATION");
            cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: ID_ENVIRONMENT --------------------
        cMap = new ColumnMap( "ID_ENVIRONMENT", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdEnvironment" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
                cMap.setInheritance("false");
                  cMap.setForeignKey("OSLCM_ENVIRONMENTS", "ID_ENVIRONMENT");
            cMap.setPosition(3);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_USERS");
        TableMap tMap = dbMap.getTable("OSLCM_USERS");
        tMap.setJavaName("User");
        tMap.setOMClass( org.oslcm.om.User.class );
        tMap.setPeerClass( org.oslcm.om.UserPeer.class );
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID_USER --------------------
        cMap = new ColumnMap( "ID_USER", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdUser" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
                cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: LOGIN --------------------
        cMap = new ColumnMap( "LOGIN", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "CHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Login" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Login usuario");
              cMap.setInheritance("false");
                cMap.setSize( 15 );
                  cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: FULLNAME --------------------
        cMap = new ColumnMap( "FULLNAME", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "FullName" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Nombre usuario");
              cMap.setInheritance("false");
                cMap.setSize( 100 );
                  cMap.setPosition(3);
          tMap.addColumn(cMap);
    // ------------- Column: PASSWORD --------------------
        cMap = new ColumnMap( "PASSWORD", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "CHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Password" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Password usuario");
              cMap.setInheritance("false");
                cMap.setSize( 50 );
                  cMap.setPosition(4);
          tMap.addColumn(cMap);
    // ------------- Column: active --------------------
        cMap = new ColumnMap( "active", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Active" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Activa cuenta");
            cMap.setDefault("1");
            cMap.setInheritance("false");
                    cMap.setPosition(5);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_PROJECTS");
        TableMap tMap = dbMap.getTable("OSLCM_PROJECTS");
        tMap.setJavaName("Project");
        tMap.setOMClass( org.oslcm.om.Project.class );
        tMap.setPeerClass( org.oslcm.om.ProjectPeer.class );
        tMap.setDescription("Tabla proyectos");
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID_PROJECT --------------------
        cMap = new ColumnMap( "ID_PROJECT", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdProject" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
            cMap.setDescription("Codigo unico proyecto");
              cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: NAME --------------------
        cMap = new ColumnMap( "NAME", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Name" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Nombre del proyecto");
              cMap.setInheritance("false");
                cMap.setSize( 100 );
                  cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: OWNER --------------------
        cMap = new ColumnMap( "OWNER", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdOwner" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Usuario reponsable del proyecto");
              cMap.setInheritance("false");
                    cMap.setPosition(3);
          tMap.addColumn(cMap);
    // ------------- Column: FATHER --------------------
        cMap = new ColumnMap( "FATHER", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdFather" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Si != 0. El codigo es el proyecto padre");
            cMap.setDefault("0");
            cMap.setInheritance("false");
                    cMap.setPosition(4);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_TEXTDOC");
        TableMap tMap = dbMap.getTable("OSLCM_TEXTDOC");
        tMap.setJavaName("Textdoc");
        tMap.setOMClass( org.oslcm.om.Textdoc.class );
        tMap.setPeerClass( org.oslcm.om.TextdocPeer.class );
        tMap.setDescription("Texto asociado al documento");
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID_TEXTDOC --------------------
        cMap = new ColumnMap( "ID_TEXTDOC", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdTextdoc" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
            cMap.setDescription("Codigo unico textdoc");
              cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: TEXTO --------------------
        cMap = new ColumnMap( "TEXTO", tMap);
        cMap.setType( new Object() );
        cMap.setTorqueType( "BLOB" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "Texto" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
                cMap.setInheritance("false");
                    cMap.setPosition(2);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

            return;
        }
        dbMap = Torque.getDatabaseMap("OSLCM");

        dbMap.addTable("OSLCM_APPLICATIONS");
        TableMap tMap = dbMap.getTable("OSLCM_APPLICATIONS");
        tMap.setJavaName("Application");
        tMap.setOMClass( org.oslcm.om.Application.class );
        tMap.setPeerClass( org.oslcm.om.ApplicationPeer.class );
        tMap.setDescription("Tabla aplicaciones");
        tMap.setPrimaryKeyMethod("none");

        ColumnMap cMap = null;


    // ------------- Column: ID_APPLICATION --------------------
        cMap = new ColumnMap( "ID_APPLICATION", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(true);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdApplication" );
        cMap.setAutoIncrement(true);
        cMap.setProtected(false);
            cMap.setDescription("Codigo unico aplicacion");
              cMap.setInheritance("false");
                    cMap.setPosition(1);
          tMap.addColumn(cMap);
    // ------------- Column: NAME --------------------
        cMap = new ColumnMap( "NAME", tMap);
        cMap.setType( "" );
        cMap.setTorqueType( "VARCHAR" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "Name" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Nombre de la aplicacion");
              cMap.setInheritance("false");
                cMap.setSize( 100 );
                  cMap.setPosition(2);
          tMap.addColumn(cMap);
    // ------------- Column: TYPE --------------------
        cMap = new ColumnMap( "TYPE", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdType" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Tipo de aplicacion, se relaciona con type entorno");
              cMap.setInheritance("false");
                    cMap.setPosition(3);
          tMap.addColumn(cMap);
    // ------------- Column: OWNER --------------------
        cMap = new ColumnMap( "OWNER", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdOwner" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Usuario responsable de la aplicacion");
              cMap.setInheritance("false");
                    cMap.setPosition(4);
          tMap.addColumn(cMap);
    // ------------- Column: ID_PROJECT --------------------
        cMap = new ColumnMap( "ID_PROJECT", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(true);
        cMap.setJavaName( "IdProject" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Proyecto que pertenece la aplicacion");
              cMap.setInheritance("false");
                  cMap.setForeignKey("OSLCM_PROJECTS", "ID_PROJECT");
            cMap.setPosition(5);
          tMap.addColumn(cMap);
    // ------------- Column: ID_REPOSITORY --------------------
        cMap = new ColumnMap( "ID_REPOSITORY", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "IdRepository" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Repositorio que se asocia a la aplicacion");
              cMap.setInheritance("false");
                  cMap.setForeignKey("OSLCM_REPOSITORIES", "ID_REPOSITORY");
            cMap.setPosition(6);
          tMap.addColumn(cMap);
    // ------------- Column: FATHER --------------------
        cMap = new ColumnMap( "FATHER", tMap);
        cMap.setType( new Integer(0) );
        cMap.setTorqueType( "INTEGER" );
        cMap.setUsePrimitive(true);
        cMap.setPrimaryKey(false);
        cMap.setNotNull(false);
        cMap.setJavaName( "IdFather" );
        cMap.setAutoIncrement(false);
        cMap.setProtected(false);
            cMap.setDescription("Si tiene valor es una aplicacion branch e indica sobre que aplicacion es el branch");
            cMap.setDefault("0");
            cMap.setInheritance("false");
                    cMap.setPosition(7);
          tMap.addColumn(cMap);
        tMap.setUseInheritance(false);
    }
View Full Code Here

TOP

Related Classes of org.apache.torque.map.TableMap

Copyright © 2018 www.massapicom. 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.