@Test public void testColumnDescList_multiClass() throws Exception { EntityMeta entityMeta = entityMetaFactory.getEntityMeta(Ggg.class); TableDesc tableDesc = tableDescFactory.getTableDesc(entityMeta); List<ColumnDesc> list = tableDesc.getColumnDescList(); assertEquals(6, list.size()); assertEquals("ID1", list.get(0).getName()); assertEquals("ID2", list.get(1).getName()); assertEquals("ID3", list.get(2).getName()); assertEquals("NAME3", list.get(3).getName()); assertEquals("NAME2", list.get(4).getName()); assertEquals("NAME1", list.get(5).getName()); }
public TableDesc getTableDesc(EntityMeta entityMeta) { String fullName = entityMeta.getTableMeta().getFullName().toLowerCase(); TableDesc tableDesc = tableDescMap.get(fullName); if (tableDesc != null) { return tableDesc; } tableDesc = createTableDesc(entityMeta); tableDescMap.put(fullName, tableDesc); return tableDesc; }
TableDescFactoryImpl implements TableDescFactory { public TableDesc getTableDesc(EntityMeta entityMeta) { String fullName = entityMeta.getTableMeta().getFullName().toLowerCase(); TableDesc tableDesc = tableDescMap.get(fullName); if (tableDesc != null) { return tableDesc; } tableDesc = createTableDesc(entityMeta); tableDescMap.put(fullName, tableDesc); return tableDesc; } }
TableDescFactoryImpl implements TableDescFactory { public TableDesc getTableDesc(EntityMeta entityMeta) { String fullName = entityMeta.getTableMeta().getFullName().toLowerCase(); TableDesc tableDesc = tableDescMap.get(fullName); if (tableDesc != null) { return tableDesc; } tableDesc = createTableDesc(entityMeta); tableDescMap.put(fullName, tableDesc); return tableDesc; } TableDescFactoryImpl(GenDialect dialect,
            ColumnDescFactory columnDescFactory,
            PrimaryKeyDescFactory primaryKeyDescFactory,
            UniqueKeyDescFactory uniqueKeyDescFactory,
            ForeignKeyDescFactory foreignKeyDescFactory,
            SequenceDescFactory sequenceDescFactory,
            IdTableDescFactory idTableDescFactory); }
TableDescFactoryImpl implements TableDescFactory { public TableDesc getTableDesc(EntityMeta entityMeta) { String fullName = entityMeta.getTableMeta().getFullName().toLowerCase(); TableDesc tableDesc = tableDescMap.get(fullName); if (tableDesc != null) { return tableDesc; } tableDesc = createTableDesc(entityMeta); tableDescMap.put(fullName, tableDesc); return tableDesc; } TableDescFactoryImpl(GenDialect dialect,
            ColumnDescFactory columnDescFactory,
            PrimaryKeyDescFactory primaryKeyDescFactory,
            UniqueKeyDescFactory uniqueKeyDescFactory,
            ForeignKeyDescFactory foreignKeyDescFactory,
            SequenceDescFactory sequenceDescFactory,
            IdTableDescFactory idTableDescFactory); TableDesc getTableDesc(EntityMeta entityMeta); }
TableDescFactoryImpl implements TableDescFactory { public TableDesc getTableDesc(EntityMeta entityMeta) { String fullName = entityMeta.getTableMeta().getFullName().toLowerCase(); TableDesc tableDesc = tableDescMap.get(fullName); if (tableDesc != null) { return tableDesc; } tableDesc = createTableDesc(entityMeta); tableDescMap.put(fullName, tableDesc); return tableDesc; } TableDescFactoryImpl(GenDialect dialect,
            ColumnDescFactory columnDescFactory,
            PrimaryKeyDescFactory primaryKeyDescFactory,
            UniqueKeyDescFactory uniqueKeyDescFactory,
            ForeignKeyDescFactory foreignKeyDescFactory,
            SequenceDescFactory sequenceDescFactory,
            IdTableDescFactory idTableDescFactory); TableDesc getTableDesc(EntityMeta entityMeta);  }