edu.udo.cs.miningmart.m4.core
Class Value

java.lang.Object
  extended byedu.udo.cs.miningmart.m4.core.M4Object
      extended byedu.udo.cs.miningmart.m4.core.M4Data
          extended byedu.udo.cs.miningmart.m4.core.GraphicalM4Object
              extended byedu.udo.cs.miningmart.m4.core.ParameterObject
                  extended byedu.udo.cs.miningmart.m4.core.Value
All Implemented Interfaces:
java.lang.Comparable, GraphicalM4Object, M4Data, M4Object, M4Table, ParameterObject, java.io.Serializable, Value, XmlInfo

public class Value
extends ParameterObject
implements XmlInfo, Value

This class represents an M4 Value.

Version:
$Id: Value.java,v 1.3 2006/04/11 14:10:14 euler Exp $
Author:
Timm Euler
See Also:
Serialized Form

Field Summary
static java.lang.String ATTRIB_DATATYPE
           
static java.lang.String ATTRIB_THE_VALUE
           
static java.lang.String ATTRIB_VALUE_ID
           
static java.lang.String ATTRIB_VALUE_NAME
           
static java.lang.String M4_TABLE_NAME
           
static M4Info m4Info
          Cache for getM4Info()
 
Fields inherited from class edu.udo.cs.miningmart.m4.core.GraphicalM4Object
graph2coord
 
Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Data
myDocumentation
 
Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Object
myId, myName
 
Fields inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
M4_XML_VERSION, TAG_COLLECTION, TAG_DOUBLE, TAG_INTEGER, TAG_LONG, TAG_M4_ID, TAG_SHORT, TAG_STRING, TAG_XML_ID
 
Fields inherited from interface edu.udo.cs.miningmart.m4.utils.M4Table
NOT_NULL
 
Constructor Summary
Value(DB m4Db)
          Constructor for Value.
 
Method Summary
 java.lang.Double getDouble()
           
 java.lang.String getIdAttributeName()
           
 java.lang.Long getLong()
           
 M4Info getM4Info()
           
 java.lang.String getM4TableName()
           
protected  java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
          This method returns the objects of the specified type that form a namespace in the scope of this M4Data object.
 long getType()
          Getter method.
 java.lang.Long getTypeL()
          Getter method.
 java.lang.String getTypeName()
           
 java.lang.String getValue()
          Getter method.
 M4Info getXmlInfo()
           
protected  boolean hasCoordinates()
          Values do not have coordinates.
 boolean isDouble()
           
 boolean isLong()
           
 void print()
          Method to print data about this M4Object.
protected  void removeAllM4References()
          This method needs to be implemented by all M4Data objects.
 void setRawValue(java.lang.String value)
          This setter method cares about conversion from database String formats and should only be used during load.
 void setType(long t)
          Setter method.
 void setType(java.lang.String conceptualDatatypeName)
           
 void setTypeL(java.lang.Long t)
          Setter method.
 void setValue(java.lang.String v)
          Setter method.
 
Methods inherited from class edu.udo.cs.miningmart.m4.core.ParameterObject
addParameterReference, getDependentObjects, getParameterReferences, removeParameterReference
 
Methods inherited from class edu.udo.cs.miningmart.m4.core.GraphicalM4Object
deleteLocal, deleteSoon, getCoordinates, getPoint, primitiveSetCoordinates, setCoordinatesDirty, setName, setPoint, storeLocal
 
Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data
exportLocal, genericGetter, genericSetter, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, importLocal, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDb, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, updateObjectsFromTable
 
Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Object
compareTo, doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
doPrint, doPrint, exportLocal, genericGetter, genericSetter, getDependentObjects, getObjectTag, getXmlIdTag, getXmlVersion, importLocal
 
Methods inherited from interface edu.udo.cs.miningmart.m4.ParameterObject
addParameterReference, getParameterReferences, removeParameterReference
 
Methods inherited from interface edu.udo.cs.miningmart.m4.GraphicalM4Object
getPoint, setPoint
 
Methods inherited from interface edu.udo.cs.miningmart.m4.M4Data
deleteSoon, getDocumentation, getValidName, isDirty, isWaitingForDelete, setDocumentation
 
Methods inherited from interface edu.udo.cs.miningmart.m4.M4Object
doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName, setId, setName
 

Field Detail

M4_TABLE_NAME

public static final java.lang.String M4_TABLE_NAME
See Also:
Constant Field Values

ATTRIB_VALUE_ID

public static final java.lang.String ATTRIB_VALUE_ID
See Also:
Constant Field Values

ATTRIB_DATATYPE

public static final java.lang.String ATTRIB_DATATYPE
See Also:
Constant Field Values

ATTRIB_VALUE_NAME

public static final java.lang.String ATTRIB_VALUE_NAME
See Also:
Constant Field Values

ATTRIB_THE_VALUE

public static final java.lang.String ATTRIB_THE_VALUE
See Also:
Constant Field Values

m4Info

public static M4Info m4Info
Cache for getM4Info()

Constructor Detail

Value

public Value(DB m4Db)
Constructor for Value.

Parameters:
m4Db -
See Also:
edu.udo.cs.miningmart.m4.core.M4Data#Constructor
Method Detail

getM4TableName

public java.lang.String getM4TableName()
Specified by:
getM4TableName in interface M4Table
See Also:
M4Table.getM4TableName()

getIdAttributeName

public java.lang.String getIdAttributeName()
Specified by:
getIdAttributeName in interface M4Table
See Also:
M4Table.getIdAttributeName()

getM4Info

public M4Info getM4Info()
Specified by:
getM4Info in interface M4Table
See Also:
M4Table.getM4Info()

getXmlInfo

public M4Info getXmlInfo()
Specified by:
getXmlInfo in interface XmlInfo
Returns:
a M4Info object with the information of all XML fields of this object.
See Also:
XmlInfo.getXmlInfo()

print

public void print()
Description copied from interface: M4Object
Method to print data about this M4Object.

Specified by:
print in interface M4Object
Overrides:
print in class GraphicalM4Object
See Also:
Parameter.print()

getObjectsInNamespace

protected java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
                                              throws M4Exception
Description copied from class: M4Data
This method returns the objects of the specified type that form a namespace in the scope of this M4Data object. For example, a Concept's namespace for the type BaseAttribute is the Collection of all BaseAttributes for this Concept. Many M4Data objects never have a namespace, they return null. If a namespace could exist but doesn't, an empty Collection is returned.

Specified by:
getObjectsInNamespace in class M4Data
Parameters:
typeOfObjects - the type of objects that form the namespace
Returns:
a Collection of objects of type typeOfObjects, or null.
Throws:
M4Exception
See Also:
M4Data.getObjectsInNamespace(Class)

setType

public void setType(long t)
Setter method.

Specified by:
setType in interface Value
Parameters:
t - the new type

setTypeL

public void setTypeL(java.lang.Long t)
Setter method.

Specified by:
setTypeL in interface Value
Parameters:
t - the new type

setType

public void setType(java.lang.String conceptualDatatypeName)
             throws M4Exception
Specified by:
setType in interface Value
Throws:
M4Exception

getTypeName

public java.lang.String getTypeName()
                             throws M4Exception
Specified by:
getTypeName in interface Value
Throws:
M4Exception

getType

public long getType()
Getter method.

Specified by:
getType in interface Value
Returns:
the type

getTypeL

public java.lang.Long getTypeL()
Getter method.

Specified by:
getTypeL in interface Value
Returns:
the type

setValue

public void setValue(java.lang.String v)
Setter method.

Specified by:
setValue in interface Value
Parameters:
v - the new value

setRawValue

public void setRawValue(java.lang.String value)
This setter method cares about conversion from database String formats and should only be used during load. The value type needs to be set already!

Specified by:
setRawValue in interface Value
Parameters:
value - the value in database String representation

getValue

public java.lang.String getValue()
Getter method.

Specified by:
getValue in interface Value
Returns:
the value

isLong

public boolean isLong()
Specified by:
isLong in interface Value
Returns:
true iff the value can be parsed to Long.

isDouble

public boolean isDouble()
Specified by:
isDouble in interface Value
Returns:
true iff the value can be parsed to Double.

getLong

public java.lang.Long getLong()
Specified by:
getLong in interface Value
Returns:
a Long object if the value isLong(), null otherwise.

getDouble

public java.lang.Double getDouble()
Specified by:
getDouble in interface Value
Returns:
a Double object if the value isDouble(), null otherwise.

hasCoordinates

protected boolean hasCoordinates()
Values do not have coordinates.

Specified by:
hasCoordinates in class GraphicalM4Object

removeAllM4References

protected void removeAllM4References()
                              throws M4Exception
Description copied from class: M4Data
This method needs to be implemented by all M4Data objects. It has to remove all references to other M4Objects.

Overrides:
removeAllM4References in class ParameterObject
Throws:
M4Exception
See Also:
M4Data.removeAllM4References()


Copyright © 2001-2005