java.lang.Object
ru.bitel.bgbilling.kernel.contract.api.server.bean.customer.CustomerDao

public class CustomerDao
extends java.lang.Object
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String TABLE_CUSTOMER  
    static java.lang.String TABLE_CUSTOMER_LINK  
    static java.lang.String TABLE_CUSTOMER_LOG  
  • Constructor Summary

    Constructors
    Constructor Description
    CustomerDao​(java.sql.Connection con)  
  • Method Summary

    Modifier and Type Method Description
    void addCustomerLink​(CustomerLink customerLink)  
    org.json.JSONArray getCustomerContracts​(int customerId, java.time.LocalDateTime onTime)  
    java.lang.String getCustomerData​(int customerId)
    Строка в JSON формате с данными клиента
    CustomerLink getCustomerLink​(int contractId, java.time.LocalDateTime dateTime)  
    java.lang.String getCustomerParameterHistory​(int customerId, java.lang.String fieldKey, int lastRecordCount)  
    int getNewCustomerId​(java.lang.String type)  
    org.json.JSONArray searchByKey​(java.lang.String type, java.lang.String key, java.lang.String value)  
    org.json.JSONArray searchByPassportRF​(java.lang.String string, java.lang.String s, java.lang.String n)  
    void setCustomerLink​(int contractId, int сustomerId, java.time.LocalDateTime linkDateTimeFrom)
    Установка связки клиент - договор
    boolean setCustomerUnlinkContract​(int contractId, java.time.LocalDateTime unlinkTime)  
    java.lang.String updateCustomerFieldValue​(int customerId, java.lang.String fieldKey, java.lang.String fieldValue, int userId)  

    Methods inherited from class java.lang.Object

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

    • TABLE_CUSTOMER

      public static final java.lang.String TABLE_CUSTOMER
      See Also:
      Constant Field Values
    • TABLE_CUSTOMER_LOG

      public static final java.lang.String TABLE_CUSTOMER_LOG
      See Also:
      Constant Field Values
  • Constructor Details

    • CustomerDao

      public CustomerDao​(java.sql.Connection con)
  • Method Details

    • getCustomerLink

      public CustomerLink getCustomerLink​(int contractId, java.time.LocalDateTime dateTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • addCustomerLink

      public void addCustomerLink​(CustomerLink customerLink) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getNewCustomerId

      public int getNewCustomerId​(java.lang.String type) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateCustomerFieldValue

      public java.lang.String updateCustomerFieldValue​(int customerId, java.lang.String fieldKey, java.lang.String fieldValue, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerData

      public java.lang.String getCustomerData​(int customerId) throws ru.bitel.bgbilling.common.BGException
      Строка в JSON формате с данными клиента
      Parameters:
      customerId -
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
    • searchByKey

      public org.json.JSONArray searchByKey​(java.lang.String type, java.lang.String key, java.lang.String value) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • searchByPassportRF

      public org.json.JSONArray searchByPassportRF​(java.lang.String string, java.lang.String s, java.lang.String n) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • setCustomerLink

      public void setCustomerLink​(int contractId, int сustomerId, java.time.LocalDateTime linkDateTimeFrom) throws ru.bitel.bgbilling.common.BGException
      Установка связки клиент - договор
      Parameters:
      contractId -
      \u0441ustomerId -
      now -
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerContracts

      public org.json.JSONArray getCustomerContracts​(int customerId, java.time.LocalDateTime onTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • setCustomerUnlinkContract

      public boolean setCustomerUnlinkContract​(int contractId, java.time.LocalDateTime unlinkTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerParameterHistory

      public java.lang.String getCustomerParameterHistory​(int customerId, java.lang.String fieldKey, int lastRecordCount) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException