Class GeneralDTO<K extends java.io.Serializable>

java.lang.Object
rs.data.impl.dto.GeneralDTO<K>
Type Parameters:
K - type of primary key
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LongDTO, MapDTO, StringDTO

public class GeneralDTO<K extends java.io.Serializable>
extends java.lang.Object
implements java.io.Serializable
Abstract Implementation for Data Transfer Objects.
Author:
ralph
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    GeneralDTO()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    RsDate getChangeDate()
    Returns the change date.
    RsDate getCreationDate()
    Returns the creation date.
    K getId()
    Returns the ID.
    java.lang.String getName()
    Returns the name.
    java.util.Map<java.lang.String,​java.lang.Object> getProperties()
    Returns the properties.
    <T> T getProperty​(java.lang.String name)
    Returns the property value.
    void setChangeDate​(RsDate changeDate)
    Sets the change date.
    void setCreationDate​(RsDate creationDate)
    Sets the creation date.
    void setId​(K id)
    Sets the ID.
    void setName​(java.lang.String name)
    Sets the name.
    void setProperty​(java.lang.String name, java.lang.Object value)
    Sets the property with given name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getId

      public K getId()
      Returns the ID.
      Returns:
      the ID
    • setId

      public void setId​(K id)
      Sets the ID.
      Parameters:
      id - the ID to set
    • getCreationDate

      public RsDate getCreationDate()
      Returns the creation date.
      Returns:
      the creation date
    • setCreationDate

      public void setCreationDate​(RsDate creationDate)
      Sets the creation date.
      Parameters:
      creationDate - the creation date to set
    • getChangeDate

      public RsDate getChangeDate()
      Returns the change date.
      Returns:
      the change date
    • setChangeDate

      public void setChangeDate​(RsDate changeDate)
      Sets the change date.
      Parameters:
      changeDate - the change date to set
    • getName

      public java.lang.String getName()
      Returns the name.
      Returns:
      the name
    • setName

      public void setName​(java.lang.String name)
      Sets the name.
      Parameters:
      name - the name to set
    • getProperty

      public <T> T getProperty​(java.lang.String name)
      Returns the property value.
      Type Parameters:
      T - the type of the value
      Parameters:
      name - name of property
      Returns:
      the value of the property
    • setProperty

      public void setProperty​(java.lang.String name, java.lang.Object value)
      Sets the property with given name.
      Parameters:
      name - name of property
      value - new value of property
    • getProperties

      public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      Returns the properties.

      This map can be incomplete as it doesn't contain properties that are handled through custom fields of the object.

      Returns:
      the properties