Package org.projectforge.address

Examples of org.projectforge.address.AddressDao


   */
  @Override
  public boolean hasAccess(final PFUserDO user, final AddressCampaignValueDO obj, final AddressCampaignValueDO oldObj,
      final OperationType operationType)
  {
    final AddressDao addressDao = (AddressDao) Registry.instance().getDao(AddressDao.class);
    if (operationType.isIn(OperationType.SELECT, OperationType.INSERT) == true && obj == null) {
      return addressDao.hasInsertAccess(user);
    }
    return addressDao.hasAccess(user, obj != null ? obj.getAddress() : null, oldObj != null ? oldObj.getAddress() : null, operationType,
        false);
  }
View Full Code Here


      resp.sendError(HttpStatus.SC_FORBIDDEN);
      return;
    }

    final String searchNumber = NumberHelper.extractPhonenumber(number);
    final AddressDao addressDao = (AddressDao) Registry.instance().getDao(AddressDao.class);

    final BaseSearchFilter filter = new BaseSearchFilter();
    filter.setSearchString("*" + searchNumber);
    final QueryFilter queryFilter = new QueryFilter(filter);

    final StringBuffer buf = new StringBuffer();
    // Use internal get list method for avoiding access checking (no user is logged-in):
    final List<AddressDO> list = addressDao.internalGetList(queryFilter);
    if (list != null && list.size() >= 1) {
      AddressDO result = list.get(0);
      if (list.size() > 1) {
        // More than one result, therefore find the newest one:
        buf.append("+"); // Mark that more than one entry does exist.
View Full Code Here

TOP

Related Classes of org.projectforge.address.AddressDao

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.