OBEROn SDK

com.oberon.ooql.sdk
Class UnitMeasure

java.lang.Object
  extended by com.oberon.ooql.sdk.OBBase
      extended by com.oberon.ooql.sdk.AdminBase
          extended by com.oberon.ooql.sdk.UnitMeasure
All Implemented Interfaces:
java.io.Serializable

public class UnitMeasure
extends AdminBase
implements java.io.Serializable

UnitMeasure Admin Object: defines a Unit Measure for Field values representation

Since:
2.4
Version:
5.0
See Also:
Serialized Form

Field Summary
static java.util.Hashtable<java.lang.Integer,UnitMeasure[]> hUnitMeasures
          Table of all pre-defined unit measures for each type ( key=UM type ; value=UnitMeasure[] )
static int UMTYPE_ACCELERATION
          Unit Measure Type: acceleration
static int UMTYPE_AREA
          Unit Measure Type: area
static int UMTYPE_CURRENCY
          Unit Measure Type: currency
static int UMTYPE_DATE
          Unit Measure Type: date format
static int UMTYPE_DATETIME
          Unit Measure Type: date-time format
static int UMTYPE_DENSITY
          Unit Measure Type: density
static int UMTYPE_DYNAMIC_VISCOSITY
          Unit Measure Type: dynamic viscosity
static int UMTYPE_ELECTRIC_CAPACITANCE
          Unit Measure Type: electric capacitance
static int UMTYPE_ELECTRIC_CHARGE
          Unit Measure Type: electric charge
static int UMTYPE_ELECTRIC_CURRENT
          Unit Measure Type: electric current
static int UMTYPE_ELECTRIC_DIPOLE
          Unit Measure Type: electric dipole
static int UMTYPE_ELECTRIC_INDUCTANCE
          Unit Measure Type: electric inductance
static int UMTYPE_ELECTRIC_POTENTIAL_DIFFERENCE
          Unit Measure Type: electric potential difference
static int UMTYPE_ELECTRIC_RESISTANCE
          Unit Measure Type: electric resistance
static int UMTYPE_ENERGY
          Unit Measure Type: energy
static int UMTYPE_FLOW
          Unit Measure Type: flow
static int UMTYPE_FLVOLUME
          Unit Measure Type: fluid volume
static int UMTYPE_FORCE
          Unit Measure Type: force
static int UMTYPE_FREQUENCY
          Unit Measure Type: frequency
static int UMTYPE_ILLUMINANCE
          Unit Measure Type: illuminance
static int UMTYPE_INFORMATION_ENTROPY
          Unit Measure Type: information entropy
static int UMTYPE_INFORMATION_QUANTITY
          Unit Measure Type: information quantity
static int UMTYPE_KINEMATIC_VISCOSITY
          Unit Measure Type: kinematic viscosity
static int UMTYPE_length
           
static int UMTYPE_LENGTH
          Unit Measure Type: length
static int UMTYPE_LUMINANCE
          Unit Measure Type: luminance
static int UMTYPE_LUMINOUS_FLUX
          Unit Measure Type: luminous flux
static int UMTYPE_LUMINOUS_INTENSITY
          Unit Measure Type: luminous intensity
static int UMTYPE_MAGNETIC_FLUX
          Unit Measure Type: magnetic flux
static int UMTYPE_MAGNETIC_FLUX_DENSITY
          Unit Measure Type: magnetic flux density
static int UMTYPE_MASS
          Unit Measure Type: mass
static int UMTYPE_NOT_DEFINED
          Unit Measure Type: not defined
static int UMTYPE_PLANE_ANGLE
          Unit Measure Type: plane angle
static int UMTYPE_POWER
          Unit Measure Type: power
static int UMTYPE_PRESSURE
          Unit Measure Type: pressure
static int UMTYPE_RADIATION_ABSORBED_DOSE
          Unit Measure Type: radiation absorbed dose
static int UMTYPE_RADIATION_EQUIVALENT_DOSE
          Unit Measure Type: radiation equivalent dose
static int UMTYPE_RADIATION_EXPOSURE
          Unit Measure Type: radiation exposure
static int UMTYPE_RADIATION_SOURCE_ACTIVITY
          Unit Measure Type: radiation source activity
static int UMTYPE_SOLID_ANGLE
          Unit Measure Type: solid angle
static int UMTYPE_SPEED
          Unit Measure Type: speed
static int UMTYPE_TEMPERATURE
          Unit Measure Type: temperature
static int UMTYPE_TIME
          Unit Measure Type: time
static int UMTYPE_TORQUE
          Unit Measure Type: torque
static int UMTYPE_VOLUME
          Unit Measure Type: volume
 
Fields inherited from class com.oberon.ooql.sdk.AdminBase
bsOptions, HIDDEN_OPTION
 
Constructor Summary
UnitMeasure()
           
UnitMeasure(int type, java.lang.String name, java.lang.String symbol, double factor, java.lang.String description)
           
UnitMeasure(java.lang.String name)
           
 
Method Summary
 java.lang.String compareUpdate(UnitMeasure refUnitMeasure, boolean checkImage, boolean overwrite, boolean force, Framework framework)
          Return/apply the OOQL command to update this UnitMeasure object and let it become equals to another reference object.
 java.lang.String convertFromDefaultDateFormat(java.lang.String value_SI)
          Convert a date expressed in the default format to the current UM format
 java.lang.String convertFromDefaultDateTimeFormat(java.lang.String value_SI)
          Convert a date expressed in the default format to the current UM format
 double convertFromSIValue(double value_SI)
          Convert a value expressed in the SI unit measure to the current UM
 java.lang.String convertToDefaultDateFormat(java.lang.String value_UM)
          Convert a date expressed in the current UM format to the correspondent default format
 java.lang.String convertToDefaultDateTimeFormat(java.lang.String value_UM)
          Convert a date expressed in the current UM format to the correspondent default format
 double convertToSIValue(double value_UM)
          Convert a value expressed in the current UM to the correspondent SI unit measure
 void create(boolean force, Framework framework)
          Create a new UnitMeasure object on the database
 void create(Framework framework)
          Create a new UnitMeasure object on the database
 void destroy(Framework framework)
          Remove the UnitMeasure object from the database
 boolean equals(UnitMeasure unitmeasure)
          Compare two UnitMeasures
 void fromXML(org.jdom.Element rootElement)
          Load the UnitMeasure properties from XML element tree
 double getConversionAddendum()
          Get the Conversion addendum
 double getConversionFactor()
          Get the Conversion factor
 java.lang.String getCreateCommand(boolean force)
          Return the OOQL command to create this UnitMeasure object with the settled properties
 java.lang.String getDateFormat()
          Get the UnitMeasure date format
 java.util.Vector<java.lang.String> getFields(Framework framework)
          Return a list of Fields where this UnitMeasure is used
 java.lang.String getFieldsAsString(java.lang.String delim, Framework framework)
          Return a list of Fields where this UnitMeasure is used, as String
 java.util.Vector<java.lang.String> getMetricSystems(Framework framework)
          Return a list of MetricSystems where this UnitMeasure is used
 java.lang.String getMetricSystemsAsString(java.lang.String delim, Framework framework)
          Return a list of MetricSystems where this UnitMeasure is used, as String
 java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
          Get a property for this UnitMeasure object by its OOQL identifier
 java.lang.String getSaveCommand(boolean force)
          Return the OOQL command to update this UnitMeasure object with the modified properties.
static UnitMeasure getSIUnitMeasure(int type)
          Get the International standard (SI) Unit Measure for the specific type
 java.lang.String getSymbol()
          Get the UnitMeasure Symbol
 java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
          Return a Vector of administrative object names extracted by using an OOQL selector
 int getType()
          Get the UnitMeasure type
 java.lang.String getTypeAsString()
          Get the UnitMeasure type in OOQL format
static java.lang.String getTypeAsString(int type)
          Convert the UnitMeasure type in OOQL format
static int getTypeFromString(java.lang.String unitmeasureType)
          Convert UnitMeasure type from OOQL format
static UnitMeasure[] getUnitMeasures(int type)
          Get the known Unit Measures list for the specific type
 void link(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
          Open the UnitMeasure object: connect the memory instance with the database instance
static UnitMeasure open(java.lang.String name, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
          Open an administrative object and read properties from the database or retrieve them from memory
 void setConversionAddendum(double addendum)
          Set the Conversion addendum.
 void setConversionFactor(double factor)
          Set the Conversion factor.
 void setDateFormat(java.lang.String format)
          Set the UnitMeasure date format.
 void setSymbol(java.lang.String symbol)
          Set the UnitMeasure Symbol.
 void setType(int type)
          Set the UnitMeasure type
 java.lang.String toString()
          Return the UnitMeasure properties as a single String
 java.lang.String toString(Framework framework)
          Return the UnitMeasure object extended properties as a single String
 org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
          Return the UnitMeasure properties as XML element tree
 org.jdom.Element toXML(Framework framework)
          Return the UnitMeasure properties as XML element tree
 void unlink(Framework framework)
          Close the object: disconnect the memory instance from the database instance
 void write(boolean force, Framework framework)
          Update the UnitMeasure object to the database
 void write(Framework framework)
          Update the UnitMeasure object to the database
 
Methods inherited from class com.oberon.ooql.sdk.AdminBase
addFeature, changedApplication, checkChangeName, checkCounters, checkCounters, getAdminType, getApplication, getCommonProperty, getCommonTargetNames, getCounters, getCreateBasicCommand, getCreateCommand, getCrtDate, getDescription, getEditBasicCommand, getFeature, getFeatures, getFeaturesAsString, getImage, getImage, getImage, getImageData, getImageFile, getModDate, getModUser, getName, getOldName, getPlainFeatures, getSaveCommand, getSVNRevision, getXMLFeatureList, hasImage, isHidden, setApplication, setCounters, setCrtDate, setDescription, setHidden, setImage, setImageData, setImageFile, setModDate, setModUser, setName, setSVNRevision, show, show, toCommonXML, toXML
 
Methods inherited from class com.oberon.ooql.sdk.OBBase
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UMTYPE_NOT_DEFINED

public static final int UMTYPE_NOT_DEFINED
Unit Measure Type: not defined

See Also:
Constant Field Values

UMTYPE_LENGTH

public static final int UMTYPE_LENGTH
Unit Measure Type: length

See Also:
Constant Field Values

UMTYPE_AREA

public static final int UMTYPE_AREA
Unit Measure Type: area

See Also:
Constant Field Values

UMTYPE_VOLUME

public static final int UMTYPE_VOLUME
Unit Measure Type: volume

See Also:
Constant Field Values

UMTYPE_FLVOLUME

public static final int UMTYPE_FLVOLUME
Unit Measure Type: fluid volume

See Also:
Constant Field Values

UMTYPE_PLANE_ANGLE

public static final int UMTYPE_PLANE_ANGLE
Unit Measure Type: plane angle

See Also:
Constant Field Values

UMTYPE_SOLID_ANGLE

public static final int UMTYPE_SOLID_ANGLE
Unit Measure Type: solid angle

See Also:
Constant Field Values

UMTYPE_MASS

public static final int UMTYPE_MASS
Unit Measure Type: mass

See Also:
Constant Field Values

UMTYPE_DENSITY

public static final int UMTYPE_DENSITY
Unit Measure Type: density

See Also:
Constant Field Values

UMTYPE_TIME

public static final int UMTYPE_TIME
Unit Measure Type: time

See Also:
Constant Field Values

UMTYPE_FREQUENCY

public static final int UMTYPE_FREQUENCY
Unit Measure Type: frequency

See Also:
Constant Field Values

UMTYPE_SPEED

public static final int UMTYPE_SPEED
Unit Measure Type: speed

See Also:
Constant Field Values

UMTYPE_ACCELERATION

public static final int UMTYPE_ACCELERATION
Unit Measure Type: acceleration

See Also:
Constant Field Values

UMTYPE_FORCE

public static final int UMTYPE_FORCE
Unit Measure Type: force

See Also:
Constant Field Values

UMTYPE_TORQUE

public static final int UMTYPE_TORQUE
Unit Measure Type: torque

See Also:
Constant Field Values

UMTYPE_ENERGY

public static final int UMTYPE_ENERGY
Unit Measure Type: energy

See Also:
Constant Field Values

UMTYPE_POWER

public static final int UMTYPE_POWER
Unit Measure Type: power

See Also:
Constant Field Values

UMTYPE_TEMPERATURE

public static final int UMTYPE_TEMPERATURE
Unit Measure Type: temperature

See Also:
Constant Field Values

UMTYPE_PRESSURE

public static final int UMTYPE_PRESSURE
Unit Measure Type: pressure

See Also:
Constant Field Values

UMTYPE_FLOW

public static final int UMTYPE_FLOW
Unit Measure Type: flow

See Also:
Constant Field Values

UMTYPE_ELECTRIC_CURRENT

public static final int UMTYPE_ELECTRIC_CURRENT
Unit Measure Type: electric current

See Also:
Constant Field Values

UMTYPE_ELECTRIC_POTENTIAL_DIFFERENCE

public static final int UMTYPE_ELECTRIC_POTENTIAL_DIFFERENCE
Unit Measure Type: electric potential difference

See Also:
Constant Field Values

UMTYPE_ELECTRIC_RESISTANCE

public static final int UMTYPE_ELECTRIC_RESISTANCE
Unit Measure Type: electric resistance

See Also:
Constant Field Values

UMTYPE_ELECTRIC_CAPACITANCE

public static final int UMTYPE_ELECTRIC_CAPACITANCE
Unit Measure Type: electric capacitance

See Also:
Constant Field Values

UMTYPE_ELECTRIC_INDUCTANCE

public static final int UMTYPE_ELECTRIC_INDUCTANCE
Unit Measure Type: electric inductance

See Also:
Constant Field Values

UMTYPE_ELECTRIC_CHARGE

public static final int UMTYPE_ELECTRIC_CHARGE
Unit Measure Type: electric charge

See Also:
Constant Field Values

UMTYPE_ELECTRIC_DIPOLE

public static final int UMTYPE_ELECTRIC_DIPOLE
Unit Measure Type: electric dipole

See Also:
Constant Field Values

UMTYPE_DYNAMIC_VISCOSITY

public static final int UMTYPE_DYNAMIC_VISCOSITY
Unit Measure Type: dynamic viscosity

See Also:
Constant Field Values

UMTYPE_KINEMATIC_VISCOSITY

public static final int UMTYPE_KINEMATIC_VISCOSITY
Unit Measure Type: kinematic viscosity

See Also:
Constant Field Values

UMTYPE_MAGNETIC_FLUX

public static final int UMTYPE_MAGNETIC_FLUX
Unit Measure Type: magnetic flux

See Also:
Constant Field Values

UMTYPE_MAGNETIC_FLUX_DENSITY

public static final int UMTYPE_MAGNETIC_FLUX_DENSITY
Unit Measure Type: magnetic flux density

See Also:
Constant Field Values

UMTYPE_INFORMATION_ENTROPY

public static final int UMTYPE_INFORMATION_ENTROPY
Unit Measure Type: information entropy

See Also:
Constant Field Values

UMTYPE_INFORMATION_QUANTITY

public static final int UMTYPE_INFORMATION_QUANTITY
Unit Measure Type: information quantity

See Also:
Constant Field Values

UMTYPE_LUMINOUS_INTENSITY

public static final int UMTYPE_LUMINOUS_INTENSITY
Unit Measure Type: luminous intensity

See Also:
Constant Field Values

UMTYPE_LUMINANCE

public static final int UMTYPE_LUMINANCE
Unit Measure Type: luminance

See Also:
Constant Field Values

UMTYPE_LUMINOUS_FLUX

public static final int UMTYPE_LUMINOUS_FLUX
Unit Measure Type: luminous flux

See Also:
Constant Field Values

UMTYPE_ILLUMINANCE

public static final int UMTYPE_ILLUMINANCE
Unit Measure Type: illuminance

See Also:
Constant Field Values

UMTYPE_RADIATION_SOURCE_ACTIVITY

public static final int UMTYPE_RADIATION_SOURCE_ACTIVITY
Unit Measure Type: radiation source activity

See Also:
Constant Field Values

UMTYPE_RADIATION_EXPOSURE

public static final int UMTYPE_RADIATION_EXPOSURE
Unit Measure Type: radiation exposure

See Also:
Constant Field Values

UMTYPE_RADIATION_ABSORBED_DOSE

public static final int UMTYPE_RADIATION_ABSORBED_DOSE
Unit Measure Type: radiation absorbed dose

See Also:
Constant Field Values

UMTYPE_RADIATION_EQUIVALENT_DOSE

public static final int UMTYPE_RADIATION_EQUIVALENT_DOSE
Unit Measure Type: radiation equivalent dose

See Also:
Constant Field Values

UMTYPE_CURRENCY

public static final int UMTYPE_CURRENCY
Unit Measure Type: currency

See Also:
Constant Field Values

UMTYPE_length

public static final int UMTYPE_length
See Also:
Constant Field Values

UMTYPE_DATE

public static final int UMTYPE_DATE
Unit Measure Type: date format

See Also:
Constant Field Values

UMTYPE_DATETIME

public static final int UMTYPE_DATETIME
Unit Measure Type: date-time format

See Also:
Constant Field Values

hUnitMeasures

public static final java.util.Hashtable<java.lang.Integer,UnitMeasure[]> hUnitMeasures
Table of all pre-defined unit measures for each type ( key=UM type ; value=UnitMeasure[] )

Constructor Detail

UnitMeasure

public UnitMeasure()

UnitMeasure

public UnitMeasure(java.lang.String name)
            throws OberonException
Parameters:
name - the name of the administrative object
Throws:
OberonException - if the name contains invalid characters

UnitMeasure

public UnitMeasure(int type,
                   java.lang.String name,
                   java.lang.String symbol,
                   double factor,
                   java.lang.String description)
            throws OberonException
Parameters:
name - the name of the administrative object
type - the UnitMeasure type
symbol - the UM symbol
factor - the Conversion Factor respect to the SI unit
description - the UM definition
Throws:
OberonException - if the name contains invalid characters
Method Detail

open

public static UnitMeasure open(java.lang.String name,
                               Framework framework,
                               java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
                        throws OberonException
Open an administrative object and read properties from the database or retrieve them from memory

Parameters:
name - the object name
framework - the current framework
counters - administrative object synch counters (if null read them from database)
Throws:
OberonException - usually due to DB SQL exceptions

link

public void link(Framework framework,
                 java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
          throws OberonException
Open the UnitMeasure object: connect the memory instance with the database instance

Specified by:
link in class AdminBase
Parameters:
framework - the current framework
counters - administrative object synch counters (if null read them from database)
Throws:
OberonException - usually due to DB SQL exceptions

create

public void create(Framework framework)
            throws OberonException
Create a new UnitMeasure object on the database

Specified by:
create in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights

create

public void create(boolean force,
                   Framework framework)
            throws OberonException
Create a new UnitMeasure object on the database

Parameters:
force - if true ignores optional features
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights
Since:
1.6

write

public void write(Framework framework)
           throws OberonException
Update the UnitMeasure object to the database

Specified by:
write in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights

write

public void write(boolean force,
                  Framework framework)
           throws OberonException
Update the UnitMeasure object to the database

Parameters:
force - if true ignores optional features
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights
Since:
1.6

unlink

public void unlink(Framework framework)
            throws OberonException
Close the object: disconnect the memory instance from the database instance

Specified by:
unlink in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions

destroy

public void destroy(Framework framework)
             throws OberonException
Remove the UnitMeasure object from the database

Specified by:
destroy in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights

setType

public void setType(int type)
Set the UnitMeasure type

Parameters:
type - the UnitMeasure type

getType

public int getType()
Get the UnitMeasure type


getTypeAsString

public static java.lang.String getTypeAsString(int type)
Convert the UnitMeasure type in OOQL format


getTypeAsString

public java.lang.String getTypeAsString()
Get the UnitMeasure type in OOQL format


getTypeFromString

public static int getTypeFromString(java.lang.String unitmeasureType)
Convert UnitMeasure type from OOQL format

Returns:
the UnitMeasure type

setSymbol

public void setSymbol(java.lang.String symbol)
Set the UnitMeasure Symbol.

Parameters:
symbol - the UM symbol

getSymbol

public java.lang.String getSymbol()
Get the UnitMeasure Symbol


setDateFormat

public void setDateFormat(java.lang.String format)
Set the UnitMeasure date format.

Parameters:
format - the date format

getDateFormat

public java.lang.String getDateFormat()
Get the UnitMeasure date format


setConversionFactor

public void setConversionFactor(double factor)
Set the Conversion factor. value[SI] = convFactor * value[UM] + convAddendum

Parameters:
factor - the Conversion Factor respect to the SI unit

getConversionFactor

public double getConversionFactor()
Get the Conversion factor

Returns:
the Conversion Factor respect to the SI unit

setConversionAddendum

public void setConversionAddendum(double addendum)
Set the Conversion addendum. value[SI] = convFactor * value[UM] + convAddendum

Parameters:
addendum - the Conversion Addendum respect to the SI unit

getConversionAddendum

public double getConversionAddendum()
Get the Conversion addendum

Returns:
the Conversion Addendum respect to the SI unit

getMetricSystems

public java.util.Vector<java.lang.String> getMetricSystems(Framework framework)
Return a list of MetricSystems where this UnitMeasure is used

Parameters:
framework - the current framework
Returns:
vector of MetricSystem names

getMetricSystemsAsString

public java.lang.String getMetricSystemsAsString(java.lang.String delim,
                                                 Framework framework)
Return a list of MetricSystems where this UnitMeasure is used, as String

Parameters:
delim - the separator item
framework - the current framework
Returns:
list of MetricSystem names separated by the delim characters

getFields

public java.util.Vector<java.lang.String> getFields(Framework framework)
Return a list of Fields where this UnitMeasure is used

Parameters:
framework - the current framework
Returns:
vector of Field names

getFieldsAsString

public java.lang.String getFieldsAsString(java.lang.String delim,
                                          Framework framework)
Return a list of Fields where this UnitMeasure is used, as String

Parameters:
delim - the separator item
framework - the current framework
Returns:
list of Menu names separated by the delim characters

getProperty

public java.lang.String getProperty(java.lang.String propertyName,
                                    java.util.Vector<java.lang.Object> filterArgs,
                                    java.lang.String token,
                                    Framework framework)
Get a property for this UnitMeasure object by its OOQL identifier

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: type , symbol ...)
filterArgs - extra arguments used to compute properties
token - separator token for complex properties
framework - the current framework
Returns:
the property value

getTargetNames

public java.util.Vector<?> getTargetNames(java.lang.String composedName,
                                          java.util.Vector<java.lang.Object> filterArgs,
                                          Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector

Specified by:
getTargetNames in class OBBase
Parameters:
composedName - OOQL property identifier/name
filterArgs - extra arguments used to compute properties
framework - the current framework
Returns:
a Vector of target names, used to extract their (sub)properties values

equals

public boolean equals(UnitMeasure unitmeasure)
Compare two UnitMeasures

Returns:
true if they have the same name

toString

public java.lang.String toString()
Return the UnitMeasure properties as a single String

Overrides:
toString in class AdminBase

toString

public java.lang.String toString(Framework framework)
Return the UnitMeasure object extended properties as a single String

Overrides:
toString in class AdminBase
Parameters:
framework - the current framework

toXML

public org.jdom.Element toXML(Framework framework)
Return the UnitMeasure properties as XML element tree

Specified by:
toXML in class AdminBase
Parameters:
framework - the current framework

toXML

public org.jdom.Element toXML(boolean getImage,
                              boolean fullDump,
                              Framework framework)
Return the UnitMeasure properties as XML element tree

Specified by:
toXML in class AdminBase
Parameters:
getImage - true to include "imagedata" element with the base64 encoded image data
fullDump - true to include detailed information
framework - the current framework

fromXML

public void fromXML(org.jdom.Element rootElement)
Load the UnitMeasure properties from XML element tree

Overrides:
fromXML in class AdminBase

getCreateCommand

public java.lang.String getCreateCommand(boolean force)
Return the OOQL command to create this UnitMeasure object with the settled properties

Specified by:
getCreateCommand in class AdminBase
Parameters:
force - if true append the "force" options at the end

getSaveCommand

public java.lang.String getSaveCommand(boolean force)
Return the OOQL command to update this UnitMeasure object with the modified properties.
If the object is new, it returns the create command.

Specified by:
getSaveCommand in class AdminBase
Parameters:
force - if true append the "force" options at the end

compareUpdate

public java.lang.String compareUpdate(UnitMeasure refUnitMeasure,
                                      boolean checkImage,
                                      boolean overwrite,
                                      boolean force,
                                      Framework framework)
                               throws OberonException
Return/apply the OOQL command to update this UnitMeasure object and let it become equals to another reference object.
This method is useful to import objects from an XML file.

Parameters:
refUnitMeasure - the reference UnitMeasure object
checkImage - if true compare also the image icon
overwrite - if true update the database object instance
force - if true ignores optional properties
framework - the current framework
Throws:
OberonException
See Also:
fromXML(Element)

getSIUnitMeasure

public static UnitMeasure getSIUnitMeasure(int type)
Get the International standard (SI) Unit Measure for the specific type


getUnitMeasures

public static UnitMeasure[] getUnitMeasures(int type)
Get the known Unit Measures list for the specific type


convertToSIValue

public double convertToSIValue(double value_UM)
Convert a value expressed in the current UM to the correspondent SI unit measure


convertFromSIValue

public double convertFromSIValue(double value_SI)
Convert a value expressed in the SI unit measure to the current UM


convertToDefaultDateFormat

public java.lang.String convertToDefaultDateFormat(java.lang.String value_UM)
                                            throws OberonException
Convert a date expressed in the current UM format to the correspondent default format

Throws:
OberonException

convertFromDefaultDateFormat

public java.lang.String convertFromDefaultDateFormat(java.lang.String value_SI)
                                              throws OberonException
Convert a date expressed in the default format to the current UM format

Throws:
OberonException

convertToDefaultDateTimeFormat

public java.lang.String convertToDefaultDateTimeFormat(java.lang.String value_UM)
                                                throws OberonException
Convert a date expressed in the current UM format to the correspondent default format

Throws:
OberonException

convertFromDefaultDateTimeFormat

public java.lang.String convertFromDefaultDateTimeFormat(java.lang.String value_SI)
                                                  throws OberonException
Convert a date expressed in the default format to the current UM format

Throws:
OberonException

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.