Class MClientShare

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

public class MClientShare extends X_AD_ClientShare
Model for sharing of client data
Version:
$Id: MClientShare.java,v 1.3 2006/07/30 00:58:37 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MClientShare

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

      public MClientShare(Properties ctx, int AD_ClientShare_ID, String trxName)
      Default Constructor
      Parameters:
      ctx - context
      AD_ClientShare_ID - id
      trxName - trx
    • MClientShare

      public MClientShare(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - trx
    • MClientShare

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

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

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

    • isClientLevelOnly

      public static boolean isClientLevelOnly(int AD_Client_ID, int AD_Table_ID)
      Parameters:
      AD_Client_ID - client
      AD_Table_ID - table
      Returns:
      true if table share at client level (i.e accessible by all org within the same tenant)
    • isOrgLevelOnly

      public static boolean isOrgLevelOnly(int AD_Client_ID, int AD_Table_ID)
      Parameters:
      AD_Client_ID - client
      AD_Table_ID - table
      Returns:
      true if table is share at org level (i.e org A can't access data of org B)
    • isClientLevelOnly

      public boolean isClientLevelOnly()
      Is Client Level Only
      Returns:
      true if client level only (shared)
    • isOrgLevelOnly

      public boolean isOrgLevelOnly()
      Is Org Level Only
      Returns:
      true if org level only (not shared)
    • getTable

      public MTable getTable()
      Get Table model
      Returns:
      table
    • getTableName

      public String getTableName()
      Get Table Name
      Returns:
      table name
    • afterSave

      protected boolean afterSave(boolean newRecord, boolean success)
      Description copied from class: PO
      Called after Save for Post-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - true if it is a new record
      success - true if save operation was success
      Returns:
      if save was a success
    • setDataToLevel

      public String setDataToLevel()
      Update AD_Org_ID of data to 0 if share type is client level only.
      Returns:
      info
    • listChildRecords

      public String listChildRecords()
      List Child Tables with ACCESSLEVEL_ClientPlusOrganization
      Returns:
      child tables
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved