Class DataBaseObject

java.lang.Object
ecmwf.common.database.DataBaseObject
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
Activity, Alias, Association, AuthorizedECUser, Category, CatUrl, ChangeLog, Country, DataFile, DataTransfer, Destination, DestinationECUser, ECSession, ECtransAccounting, ECtransDestination, ECtransHistory, ECtransModule, ECUser, Event, ExistingStorageDirectory, Feedback, Host, HostECUser, HostLocation, HostOutput, HostStats, IncomingAssociation, IncomingHistory, IncomingPermission, IncomingPolicy, IncomingUser, MetadataAttribute, MetadataValue, MonitoringValue, MSUser, Notification, Operation, Permission, PolicyAssociation, PolicyUser, PortalTraffic, Privileged, ProductStatus, Publication, Rates, Reception, SchedulerValue, Spool, Traffic, TransferECUser, TransferGroup, TransferHistory, TransferMethod, TransferModule, TransferServer, TransferStatistics, UploadHistory, Url, WebUser, WeuCat

public abstract class DataBaseObject extends Object implements Serializable, Cloneable
The Class DataBaseObject.
See Also:
  • Field Details

    • TAG_ACROSS_MULTIPLE_LINES

      public static final String TAG_ACROSS_MULTIPLE_LINES
      The Constant TAG_ACROSS_MULTIPLE_LINES.
      See Also:
    • TAG_END_OF_LINES

      public static final String TAG_END_OF_LINES
      The Constant TAG_END_OF_LINES.
      See Also:
    • collectionSize

      protected int collectionSize
      The collection size.
  • Constructor Details

    • DataBaseObject

      public DataBaseObject()
  • Method Details

    • getCollectionSize

      public int getCollectionSize()
      Gets the collection size.
      Returns:
      the collection size
    • setCollectionSize

      public void setCollectionSize(int collectionSize)
      Sets the collection size.
      Parameters:
      collectionSize - the new collection size
    • clone

      public Object clone()
      Clone.
      Overrides:
      clone in class Object
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object
    • toString

      public String toString(boolean onSingleLine)
      Converts into string.
      Parameters:
      onSingleLine - the on single line
      Returns:
      the string
    • compare

      public String compare(DataBaseObject object, boolean mergeOriginalRevised)
      Compare.
      Parameters:
      object - the object
      mergeOriginalRevised - the merge original revised
      Returns:
      the string
    • toString

      public static final String toString(Object object, boolean onSingleLine)
      Converts into string.
      Parameters:
      object - the object
      onSingleLine - the on single line
      Returns:
      the string
    • toString

      public static final String toString(Object object)
      Converts into string.
      Parameters:
      object - the object
      Returns:
      the string
    • compare

      public static final String compare(Object object1, Object object2, boolean mergeOriginalRevised)
      Compare 2 Objects.
      Parameters:
      object1 - the object1
      object2 - the object2
      mergeOriginalRevised - the merge original revised
      Returns:
      the string
    • removeHiddenOptions

      public static String removeHiddenOptions(String properties) throws IOException
      Removes all hidden/internal options from a raw HOS_DATA properties string. These options are managed automatically by the system and should not be visible or editable by the user in the host editor. The same set of options is stripped in toString(Object, boolean) and compare(DataBaseObject, boolean).
      Parameters:
      properties - the raw properties text (the portion before ECtransSetup.SEPARATOR)
      Returns:
      the properties text with hidden options removed
      Throws:
      IOException - if reading the properties string fails
    • strim

      protected static final String strim(String field, int length)
      Strim.
      Parameters:
      field - the field
      length - the length
      Returns:
      the string
    • integerToString

      protected static final String integerToString(Integer param)
      Integer to string.
      Parameters:
      param - the param
      Returns:
      the string
    • stringToInteger

      protected static final Integer stringToInteger(String param)
      String to integer.
      Parameters:
      param - the param
      Returns:
      the integer
    • stringToLong

      protected static final Long stringToLong(String param)
      String to long.
      Parameters:
      param - the param
      Returns:
      the long
    • integerToInt

      protected static final int integerToInt(Integer param, int defaultValue)
      Integer to int.
      Parameters:
      param - the param
      defaultValue - the default value
      Returns:
      the int
    • stringToString

      protected static final String stringToString(String param, String defaultValue)
      String to string.
      Parameters:
      param - the param
      defaultValue - the default value
      Returns:
      the string
    • bigDecimalToTimestamp

      protected static final Timestamp bigDecimalToTimestamp(BigDecimal param)
      Big decimal to timestamp.
      Parameters:
      param - the param
      Returns:
      the timestamp
    • timestampToBigDecimal

      protected static final BigDecimal timestampToBigDecimal(Timestamp param)
      Timestamp to big decimal.
      Parameters:
      param - the param
      Returns:
      the big decimal