Beispiel #1
0
  /**
   * @param myProduct
   * @return
   * @throws BasicException
   */
  public final String getProductRecordType(Object[] myProduct) throws BasicException {
    // check if the product exist with all the details, if so return product ID
    if (m_getProductAllFields.find(myProduct) != null) {
      return m_getProductAllFields.find(myProduct).toString();
    }
    // check if the product exists with matching reference and code, but a different name
    if (m_getProductRefAndCode.find(myProduct[0], myProduct[1]) != null) {
      return "name error";
    }

    if (m_getProductRefAndName.find(myProduct[0], myProduct[2]) != null) {
      return "barcode error";
    }

    if (m_getProductCodeAndName.find(myProduct[1], myProduct[2]) != null) {
      return "reference error";
    }

    if (m_getProductByReference.find(myProduct[0]) != null) {
      return "Duplicate Reference found.";
    }

    if (m_getProductByCode.find(myProduct[1]) != null) {
      return "Duplicate Barcode found.";
    }

    if (m_getProductByName.find(myProduct[2]) != null) {
      return "Duplicate Description found.";
    }

    return "new";
  }
 public final String findRolePermissions(String sRole) {
   try {
     return Formats.BYTEA.formatValue(m_rolepermissions.find(sRole));
   } catch (BasicException e) {
     return null;
   }
 }
 public final int checkHistoricVersion(String version) {
   try {
     Integer i = (Integer) m_checkHistoricVersion.find(version);
     return (i == null) ? 0 : i;
   } catch (BasicException ex) {
     Logger.getLogger(DataLogicSystem.class.getName()).log(Level.SEVERE, null, ex);
   }
   return 0;
 }
Beispiel #4
0
  //    private final byte[] getResource(String name) {
  private byte[] getResource(String name) {

    byte[] resource;

    resource = resourcescache.get(name);

    if (resource == null) {
      // Primero trato de obtenerlo de la tabla de recursos
      try {
        resource = (byte[]) m_resourcebytes.find(name);
        resourcescache.put(name, resource);
      } catch (BasicException e) {
        resource = null;
      }
    }

    return resource;
  }
Beispiel #5
0
 /**
  * @param iLocation
  * @return
  * @throws BasicException
  */
 public final String findLocationName(String iLocation) throws BasicException {
   return (String) m_locationfind.find(iLocation);
 }
Beispiel #6
0
 /**
  * @param sActiveCashIndex
  * @return
  * @throws BasicException
  */
 public final Object[] findActiveCash(String sActiveCashIndex) throws BasicException {
   return (Object[]) m_activecash.find(sActiveCashIndex);
 }
Beispiel #7
0
 /**
  * @param host
  * @return
  * @throws BasicException
  */
 public final int getSequenceCash(String host) throws BasicException {
   Integer i = (Integer) m_sequencecash.find(host);
   return (i == null) ? 1 : i;
 }
Beispiel #8
0
 /**
  * @param card
  * @return
  * @throws BasicException
  */
 public final AppUser findPeopleByCard(String card) throws BasicException {
   return (AppUser) m_peoplebycard.find(card);
 }
Beispiel #9
0
 /**
  * @return
  * @throws BasicException
  */
 public final String findVersion() throws BasicException {
   return (String) m_version.find(AppLocal.APP_ID);
 }
 public final int getRecordCount(String money, String ticket) throws BasicException {
   Integer i = (Integer) m_getRecordCount.find(money, ticket);
   return (i == null) ? 1 : i;
 }
 public final AppUser getsuperuser() throws BasicException {
   return (AppUser) m_getsuperuser.find();
 }