org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model
Class Field

java.lang.Object
  extended by org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.DataModel
      extended by org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.Field
All Implemented Interfaces:
Comparable<Field>

public class Field
extends DataModel
implements Comparable<Field>


Field Summary
static String VOID
           
 
Constructor Summary
Field()
           
Field(org.json.JSONObject obj)
           
Field(String name, String value)
           
Field(String name, String value, FieldType type)
           
 
Method Summary
 int compareTo(Field arg0)
           
static ArrayList<Field> fromJSONArray(org.json.JSONArray array)
           
 String getOperator()
           
static FieldType getType(int SQLType)
           
 Boolean getValueAsBoolean()
           
 Boolean getValueAsBoolean(String defaultValue)
           
 Double getValueAsDouble()
           
 Double getValueAsDouble(String defaultValue)
           
 Integer getValueAsInteger()
           
 Integer getValueAsInteger(String defaultValue)
           
 Long getValueAsLong()
           
 Long getValueAsLong(String defaultValue)
           
 boolean isNull()
           
static List<List<Field>> loadResultSet(ResultSet rs)
           
static List<Field> loadRow(ResultSet rs)
           
 String name()
           
 void name(String name)
           
static org.json.JSONArray toJSONArray(List<Field> list)
           
 org.json.JSONObject toJSONObject()
           
 String toString()
           
 FieldType type()
           
 void type(FieldType type)
           
 boolean validate()
           
 String value()
           
 void value(String value)
           
 
Methods inherited from class org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.DataModel
fromXML, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VOID

public static final String VOID
See Also:
Constant Field Values
Constructor Detail

Field

public Field()

Field

public Field(String name,
             String value)

Field

public Field(String name,
             String value,
             FieldType type)

Field

public Field(org.json.JSONObject obj)
      throws org.json.JSONException
Throws:
org.json.JSONException
Method Detail

type

public FieldType type()

type

public void type(FieldType type)

name

public String name()

name

public void name(String name)

value

public String value()

value

public void value(String value)

getOperator

public String getOperator()

loadRow

public static List<Field> loadRow(ResultSet rs)
                           throws Exception
Throws:
Exception

getType

public static FieldType getType(int SQLType)

loadResultSet

public static List<List<Field>> loadResultSet(ResultSet rs)
                                       throws SQLException
Throws:
SQLException

getValueAsDouble

public Double getValueAsDouble()

getValueAsInteger

public Integer getValueAsInteger()

getValueAsLong

public Long getValueAsLong()

getValueAsBoolean

public Boolean getValueAsBoolean()

isNull

public boolean isNull()

validate

public boolean validate()

getValueAsDouble

public Double getValueAsDouble(String defaultValue)

getValueAsInteger

public Integer getValueAsInteger(String defaultValue)

getValueAsLong

public Long getValueAsLong(String defaultValue)

getValueAsBoolean

public Boolean getValueAsBoolean(String defaultValue)

toJSONObject

public org.json.JSONObject toJSONObject()
                                 throws org.json.JSONException
Throws:
org.json.JSONException

fromJSONArray

public static ArrayList<Field> fromJSONArray(org.json.JSONArray array)
                                      throws org.json.JSONException
Throws:
org.json.JSONException

toJSONArray

public static org.json.JSONArray toJSONArray(List<Field> list)
                                      throws org.json.JSONException
Throws:
org.json.JSONException

compareTo

public int compareTo(Field arg0)
Specified by:
compareTo in interface Comparable<Field>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.