org.melati.poem
Class TableFactory

Package class diagram package TableFactory
java.lang.Object
  extended by 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

Method Summary
static Table fromClass(Database db, Class clazz)
           
static Table fromInstance(Database db, Object pojo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromInstance

public static Table fromInstance(Database db,
                                 Object pojo)
Parameters:
db - the database to create table in and lookup existing tables
pojo - 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 tables
clazz - class to introspect
Returns:
A new or existing table


Copyright © 2000-2010 PanEris. All Rights Reserved.