@Test public void testGetAttributeDescList() throws Exception { DbColumnMeta columnMeta1 = new DbColumnMeta(); columnMeta1.setName("BAR"); columnMeta1.setTypeName("varchar"); DbColumnMeta columnMeta2 = new DbColumnMeta(); columnMeta2.setName("FOO"); columnMeta2.setTypeName("varchar"); DbTableMeta tableMeta = new DbTableMeta(); tableMeta.setName("HOGE"); tableMeta.addColumnMeta(columnMeta1); tableMeta.addColumnMeta(columnMeta2); EntityDesc entityDesc = factory.getEntityDesc(tableMeta); assertEquals(2, entityDesc.getAttributeDescList().size()); }
public EntityDesc getEntityDesc(DbTableMeta tableMeta) { EntityDesc entityDesc = new EntityDesc(); doName(tableMeta, entityDesc); doTable(tableMeta, entityDesc); doAttributeDesc(tableMeta, entityDesc); doCompositeUniqueConstraintDesc(tableMeta, entityDesc); return entityDesc; }
EntityDescFactoryImpl implements EntityDescFactory { public EntityDesc getEntityDesc(DbTableMeta tableMeta) { EntityDesc entityDesc = new EntityDesc(); doName(tableMeta, entityDesc); doTable(tableMeta, entityDesc); doAttributeDesc(tableMeta, entityDesc); doCompositeUniqueConstraintDesc(tableMeta, entityDesc); return entityDesc; } }
EntityDescFactoryImpl implements EntityDescFactory { public EntityDesc getEntityDesc(DbTableMeta tableMeta) { EntityDesc entityDesc = new EntityDesc(); doName(tableMeta, entityDesc); doTable(tableMeta, entityDesc); doAttributeDesc(tableMeta, entityDesc); doCompositeUniqueConstraintDesc(tableMeta, entityDesc); return entityDesc; } EntityDescFactoryImpl(
            PersistenceConvention persistenceConvention,
            AttributeDescFactory attributeDescFactory,
            CompositeUniqueConstraintDescFactory compositeUniqueConstraintDescFactory); }
EntityDescFactoryImpl implements EntityDescFactory { public EntityDesc getEntityDesc(DbTableMeta tableMeta) { EntityDesc entityDesc = new EntityDesc(); doName(tableMeta, entityDesc); doTable(tableMeta, entityDesc); doAttributeDesc(tableMeta, entityDesc); doCompositeUniqueConstraintDesc(tableMeta, entityDesc); return entityDesc; } EntityDescFactoryImpl(
            PersistenceConvention persistenceConvention,
            AttributeDescFactory attributeDescFactory,
            CompositeUniqueConstraintDescFactory compositeUniqueConstraintDescFactory); EntityDesc getEntityDesc(DbTableMeta tableMeta); }
EntityDescFactoryImpl implements EntityDescFactory { public EntityDesc getEntityDesc(DbTableMeta tableMeta) { EntityDesc entityDesc = new EntityDesc(); doName(tableMeta, entityDesc); doTable(tableMeta, entityDesc); doAttributeDesc(tableMeta, entityDesc); doCompositeUniqueConstraintDesc(tableMeta, entityDesc); return entityDesc; } EntityDescFactoryImpl(
            PersistenceConvention persistenceConvention,
            AttributeDescFactory attributeDescFactory,
            CompositeUniqueConstraintDescFactory compositeUniqueConstraintDescFactory); EntityDesc getEntityDesc(DbTableMeta tableMeta);  }