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)
      After Save
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - new
      success - success
      Returns:
      true
    • 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)
      Before Save
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new
      Returns:
      true