org.xerial.db
Class Relation
java.lang.Object
org.xerial.db.Relation
public class Relation
- extends Object
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 JSONException
- Throws:
JSONException
Relation
public Relation(JSONObject jsonObj)
throws JSONException
- Throws:
JSONException
getDataType
public static DataType getDataType(String parameterName,
String typeName)
add
public void add(DataType dataType)
getDataType
public DataType getDataType(int index)
getDataTypeIndex
public int getDataTypeIndex(String parameterName)
getDataTypeList
public List<DataType> getDataTypeList()
toString
public String toString()
- Overrides:
toString in class Object

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.