org.utgenome.gwt.utgb.client.db
Class Relation

java.lang.Object
  extended by org.utgenome.gwt.utgb.client.db.Relation
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class Relation
extends Object
implements com.google.gwt.user.client.rpc.IsSerializable

A Relation holds one or more DataTypes and denotes their relationships. For example, in relational databases, a table has a structure, e.g. (pid:integer, name:string, address:string) You can construct this structure as follows: Relation r = new Relation(); r.add("pid", new IntegerType()); r.add("name", new StringType()); r.add("address", new StringType()); JSON format example. {"relation":[["id", "integer"], ["name", "string"], ...]}

Author:
leo

Constructor Summary
Relation()
           
Relation(com.google.gwt.json.client.JSONObject jsonObj)
           
Relation(String jsonStr)
           
 
Method Summary
 void add(DataType dataType)
           
 DataType getDataType(int index)
           
static DataType getDataType(String parameterName, String typeName)
           
 List<DataType> getDataTypeList()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Relation

public Relation()

Relation

public Relation(String jsonStr)
         throws UTGBClientException
Throws:
UTGBClientException

Relation

public Relation(com.google.gwt.json.client.JSONObject jsonObj)
         throws UTGBClientException
Throws:
UTGBClientException
Method Detail

getDataType

public static DataType getDataType(String parameterName,
                                   String typeName)
                            throws UTGBClientException
Throws:
UTGBClientException

add

public void add(DataType dataType)

getDataType

public DataType getDataType(int index)

getDataTypeList

public List<DataType> getDataTypeList()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 utgenome.org. All Rights Reserved.