org.melati.poem
Class TableFactory
java.lang.Object
org.melati.poem.TableFactory
public final class TableFactory
- extends Object
Given an Object or class create a set of Tables to represent the graph
it is the starting node of, and populate it for an Object.
The rules are a sub-set of the Hibernate rules:
Only public types can be persisted.
Only members with a public setter and getter will be persisted.
If the object has a field called Id then the Persistent troid column will be called
poemId.
- Since:
- 12 Jun 2007
- Author:
- timp
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fromInstance
public static Table fromInstance(Database db,
Object pojo)
- Parameters:
db
- the database to create table in and lookup existing tablespojo
- class to introspect
- Returns:
- A new or existing table
fromClass
public static Table fromClass(Database db,
Class clazz)
- Parameters:
db
- the database to create table in and lookup existing tablesclazz
- class to introspect
- Returns:
- A new or existing table
Copyright © 2000-2010 PanEris. All Rights Reserved.