com.sap.mdm.schema
Class UnitProperties

java.lang.Object
  extended bycom.sap.mdm.schema.UnitProperties
All Implemented Interfaces:
Cloneable, NamedRepositoryItem, RepositoryItem

public class UnitProperties
extends Object
implements NamedRepositoryItem

This class represents a MDM unit, such as an inch, a milligram, etc.


Field Summary
static int FRACTIONS_ALL
           
static int FRACTIONS_NONE
           
static int FRACTIONS_OF_TWO
           
 
Constructor Summary
UnitProperties(int id, String name, int sortPos, String suffix, int isPrefix, String synonyms, int dimensionId, double factor, double preoffset, int logToUniversal, int fractionType, int unitSystem, int counterPartId)
          Constructs with the specified parameters.
 
Method Summary
 boolean equals(Object obj)
           
 String getCode()
          Returns a string identifier for a named repository object.
 DimensionId getDimensionId()
          Returns the dimension Id the unit belongs to.
 double getFactor()
           
 int getFractionType()
          Returns the fraction type.
 UnitId getId()
          Get unit ID
 String getName()
           
 String getName(Locale locale)
          Returns the unit name.
 double getPreoffset()
           
 String getSuffix()
          Returns the suffix.
 String[] getSynonyms()
          Returns the synonyms.
 int hashCode()
           
 boolean isLogToUniversal()
           
 boolean isPrefix()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FRACTIONS_NONE

public static final int FRACTIONS_NONE
See Also:
Constant Field Values

FRACTIONS_OF_TWO

public static final int FRACTIONS_OF_TWO
See Also:
Constant Field Values

FRACTIONS_ALL

public static final int FRACTIONS_ALL
See Also:
Constant Field Values
Constructor Detail

UnitProperties

public UnitProperties(int id,
                      String name,
                      int sortPos,
                      String suffix,
                      int isPrefix,
                      String synonyms,
                      int dimensionId,
                      double factor,
                      double preoffset,
                      int logToUniversal,
                      int fractionType,
                      int unitSystem,
                      int counterPartId)
Constructs with the specified parameters.

Parameters:
id - the unit Id
name - the unit name
sortPos - the sort position
suffix - the unit suffix
isPrefix - whether the unit is a prefix
synonyms - a synonym for the unit
dimensionId - the dimension the unit belongs to
factor -
preoffset -
logToUniversal -
fractionType -
Method Detail

getCode

public String getCode()
Description copied from interface: NamedRepositoryItem
Returns a string identifier for a named repository object.

Specified by:
getCode in interface NamedRepositoryItem
Returns:
the code name

getId

public UnitId getId()
Get unit ID

Returns:
unit ID

getName

public String getName(Locale locale)
Returns the unit name.

Parameters:
locale - the locale.
Returns:
the unit name.

getSuffix

public String getSuffix()
Returns the suffix.

Returns:
a suffix

getSynonyms

public String[] getSynonyms()
Returns the synonyms.

Returns:
a synonym

getDimensionId

public DimensionId getDimensionId()
Returns the dimension Id the unit belongs to.

Returns:
a dimension Id

getFractionType

public int getFractionType()
Returns the fraction type.

Returns:
the fraction type
See Also:
for constants of availavle fraction types

hashCode

public int hashCode()

equals

public boolean equals(Object obj)

toString

public String toString()

isPrefix

public boolean isPrefix()
Returns:
the isPrefix

isLogToUniversal

public boolean isLogToUniversal()
Returns:
the logToUniversal

getPreoffset

public double getPreoffset()
Returns:
the preoffset

getFactor

public double getFactor()
Returns:
the factor

getName

public String getName()
Returns:
the name


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.