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";
  }
Beispiel #2
0
  public final String findRolePermissions(String sRole) {

    try {
      return Formats.BYTEA.formatValue(m_rolepermissions.find(sRole));
    } catch (BasicException e) {
      return null;
    }
  }
Beispiel #3
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 #4
0
 public final String findLocationName(String iLocation) throws BasicException {
   return (String) m_locationfind.find(iLocation);
 }
Beispiel #5
0
 public final Object[] findActiveCash(String sActiveCashIndex) throws BasicException {
   return (Object[]) m_activecash.find(sActiveCashIndex);
 }
Beispiel #6
0
 public final int getSequenceCash(String host) throws BasicException {
   Integer i = (Integer) m_sequencecash.find(host);
   return (i == null) ? 1 : i.intValue();
 }
Beispiel #7
0
 public final AppUser findPeopleByCard(String card) throws BasicException {
   return (AppUser) m_peoplebycard.find(card);
 }
Beispiel #8
0
 public final String findVersion() throws BasicException {
   return (String) m_version.find(AppLocal.APP_ID);
 }