org.utgenome.gwt.utgb.client.db
Class Relation
java.lang.Object
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
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
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.