Examples of DBRelation


Examples of de.mhus.lib.adb.annotations.DbRelation

  protected void parseFields() throws Exception {
    for (Method m : getMethods(clazz)) {
      DbPrimaryKey pk = m.getAnnotation(DbPrimaryKey.class);
      DbPersistent p  = m.getAnnotation(DbPersistent.class);
      DbIndex idx = m.getAnnotation(DbIndex.class);
      DbRelation r  = m.getAnnotation(DbRelation.class);

//      for ( Annotation a : m.getAnnotations()) {
//        System.out.println(m.getName() + ": " + a.toString());
//      }
     
View Full Code Here

Examples of org.apache.empire.db.DBRelation

        }
       
        // add the relation
        DBRelation.DBReference reference = fkCol.referenceOn(pkCol);
        DBRelation.DBReference[] refs = null;
          DBRelation r = db.getRelation(relName);
            if (r!=null) {
              DBRelation.DBReference[] refsOld = r.getReferences();
              refs = new DBRelation.DBReference[refsOld.length+1];
              int i=0;
              for (; i<refsOld.length; i++)
                refs[i]=refsOld[i];
              refs[i]=reference;
View Full Code Here

Examples of org.apache.empire.db.DBRelation

    assertNotNull("Expected EMPLOYEES table.", employees);

        final List<DBRelation> relations = db.getRelations();
        assertEquals("Should have two relations.", 2, relations.size());

        final DBRelation dbRelation = relations.get(1);
        assertEquals("EMPLOYEES_DEPARTMENT_I_FK", dbRelation.getName());

        final DBReference[] references = dbRelation.getReferences();
        assertEquals("Should reference one column.", 1, references.length);

        final DBReference dbReference = references[0];
    assertEquals(dbReference.getSourceColumn(), employees.getColumn("DEPARTMENT_ID"));
        assertEquals(dbReference.getTargetColumn(), departments.getColumn("DEPARTMENT_ID"));
View Full Code Here

Examples of org.apache.empire.db.DBRelation

        }
       
        // add the relation
        DBRelation.DBReference reference = fkCol.referenceOn(pkCol);
        DBRelation.DBReference[] refs = null;
          DBRelation r = db.getRelation(relName);
            if (r!=null) {
              DBRelation.DBReference[] refsOld = r.getReferences();
              refs = new DBRelation.DBReference[refsOld.length+1];
              int i=0;
              for (; i<refsOld.length; i++)
                refs[i]=refsOld[i];
              refs[i]=reference;
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.