Class MCity

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_C_City, I_Persistent, Evaluatee, ImmutablePOSupport

public class MCity extends X_C_City implements Comparator<Object>, Serializable, ImmutablePOSupport
Location City Model (Value Object)
Author:
Mario Calderon / Carlos Ruiz
See Also:
  • Constructor Details

    • MCity

      public MCity(Properties ctx, String C_City_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      C_City_UU - UUID key
      trxName - Transaction
    • MCity

      public MCity(Properties ctx, int C_City_ID, String trxName)
      Create empty City
      Parameters:
      ctx - context
      C_City_ID - id
      trxName - transaction
    • MCity

      public MCity(Properties ctx, ResultSet rs, String trxName)
      Create City from current row in ResultSet
      Parameters:
      ctx - context
      rs - result set
      trxName - transaction
    • MCity

      public MCity(MRegion region, String cityName)
      Parent Constructor
      Parameters:
      region - Region
      cityName - City Name
    • MCity

      public MCity(MCity copy)
      Copy constructor
      Parameters:
      copy -
    • MCity

      public MCity(Properties ctx, MCity copy)
      Copy constructor
      Parameters:
      ctx -
      copy -
    • MCity

      public MCity(Properties ctx, MCity copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • get

      public static MCity get(int C_City_ID)
      Get City (cached) (immutable)
      Parameters:
      C_City_ID - ID
      Returns:
      City
    • get

      public static MCity get(Properties ctx, int C_City_ID)
      Get City (cached) (immutable)
      Parameters:
      ctx - context
      C_City_ID - ID
      Returns:
      City
    • toString

      public String toString()
      Return Name
      Overrides:
      toString in class X_C_City
      Returns:
      Name
    • compare

      public int compare(Object o1, Object o2)
      Compare
      Specified by:
      compare in interface Comparator<Object>
      Overrides:
      compare in class PO
      Parameters:
      o1 - object 1
      o2 - object 2
      Returns:
      -1,0, 1
    • markImmutable

      public MCity markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO