Examples of Company


Examples of com.art.anette.datamodel.dataobjects.managed.Company

        cd.name = "[loading Company...]";
        cd.postcode = "";
        cd.street = "";
        cd.town = "";
        cd.website = "";
        Company company =
                new Company(this, DBControl.THE_COMPANY_ID, 0, cd);
        company.setState(Status.NEW);
        return company;
    }
View Full Code Here

Examples of com.art.anette.datamodel.dataobjects.managed.Company

        try {
            String q = SQLFormatter.generateQuery("SELECT * FROM %s WHERE %s LIMIT 1", Company.getTableName(), getTimestampQuery(ts));
            ResultSet rs = dbConnector.query(q);
            if (rs.next()) {
                if (stub) {
                    return new Company(sdbc, rs.getLong("id"));
                } else {
                    return new Company(sdbc, rs);
                }
            }
            rs.close();

        } catch (SQLException ex) {
View Full Code Here

Examples of com.art.anette.datamodel.dataobjects.managed.Company

    /**
     * Die Daten des Unternehmens werden ausgelesen und angezeigt.
     */
    @Override
    protected void update() {
        Company company = (Company) dataObject;

        lblName.setText(company.getName());
        lblManager.setText(company.getManager().toString());
        lblStreet.setText(company.getStreet());
        lblPostcode.setText(company.getPostcode());
        lblTown.setText(company.getTown());
        lblCountry.setText(company.getCountry());
        lblWebsite.setText(company.getWebsite());

        pbProgress.setValue(Logic.getProgress(company));
        pbTimeProgress.setValue(Logic.getTimeProgress(company));
    }
View Full Code Here

Examples of com.art.anette.datamodel.dataobjects.managed.Company

        return instance;
    }

    @Override
    public List<Employee> getTableEntries() {
        Company company = (Company) object;

        Logic.lockReading();
        List<Employee> employees = new ArrayList<Employee>();
        try {
            for (Employee employee : company.getEmployees()) {
                if (employee.getId() != DBControl.DUMMY_EMPLOYEE_ID) {
                    employees.add(employee);
                    employee.addObserver(this);
                }
            }
View Full Code Here

Examples of com.casamind.adware.server.domain.Company

    try {
      DocumentListEntry entry = null;
      if (task.equals(GoogleDocumentsTaskTypes.CREATE)) {
        log.info("Entering GDataTaskTypes.CREATE task!");
        if (companyId != null) {
          Company company = DatastoreProxy.getCompanyById(companyId);
          if (company != null) {
           
          } else {
            log.warning("No Compny found with id=" + companyId + ". Will exit servlet!");
          }
          String serviceStr = "", unitPriceStr = "";
          Double totalPrice = 0.0, totalDue = 0.0;
          List<Long> ids = new ArrayList<Long>();
          for (String idStr : entityIds.split(",")){
            ids.add(Long.parseLong(idStr));
          }
          for (Long id : ids){           
            Slot entity = DatastoreProxy.getSlotById(id);
            if (entity != null) {
              serviceStr += "Cr&eacute;neau publicitaire du " + formatter.format(entity.getStartDate()) + " au " + formatter.format(entity.getEndDate()) + "\n";
              unitPriceStr += Integer.toString(entity.getPrice()) + "\n";
              totalPrice += entity.getPrice();
              log.info("Found slot with id=" + id + ". Will add service line.");
            } else {
              log.warning("No slot found with id=" + id);
            }
          }
          String body = Strings.convertStreamToString(new FileInputStream("WEB-INF/files/templates/bill_slot_invoiced.html"));
          body = Strings.formatSpecialCharacters(body
              .replace("$billDate", formatter.format(new Date()))
              .replace("$billNumber", Integer.toString(billNumber))
              .replace("$project", "Avicena")
              .replace("$company", company.getDisplayName())
              .replace("$billingAddress", company.getBillingAddress())
              .replace("$phone", company.getPhone())
              .replace("$email", company.getEmail())
              .replace("$service", serviceStr)
              .replace("$unitPrice", unitPriceStr)
              .replace("$discount", Integer.toString(0))
              .replace("$totalPrice", Integer.toString(dto.getPrice()))
              .replace("$totalDue", Double.toString(dto.getPrice() + (dto.getPrice() * 0.196))));
 
View Full Code Here

Examples of com.casamind.adware.server.domain.Company

    admin.setReceiveNewsLetter(true);
    admin.setReceiveNotifications(true);
    admin.setAccessLevel(AccessLevels.Administrator);
    userAccountDAO.put(admin);
    for (int i = 0; i < 2; i++) {
      Company company = new Company();
      company.setAccessLevel(AccessLevels.Company);
      company.setLogin("company" + i + "@example.com");
      company.setService(AuthTypes.GOOGLE);
      company.setUniqueId(company.getLogin() + "-" + company.getService());
      company.setLastname("Company " + i);
      company.setFirstname("");
      company.setStreet("Street adress for company " + 1);
      company.setCity("City " + i);
      company.setPhone("+212522" + (100000 + rand.nextInt(999999)));
      company.setFax("+212522" + (100000 + rand.nextInt(999999)));
      company.setMobile("+2126" + (10000000 + rand.nextInt(99999999)));
      company.setEmail("contact@company" + i + ".com");
      company.setWebsite("www.company" + i + ".com");
      company.setReceiveNewsLetter(false);
      company.setReceiveNotifications(false);
      company.setLastLoginOn(calendar.getTime());
      companyDAO.put(company);
      for (int j = 0; j < 2; j++) {
        Publisher publisher = new Publisher();
        publisher.setAccessLevel(AccessLevels.Publisher);
        publisher.setLogin("publisher" + j + "@company" + i + ".com");
        publisher.setService(AuthTypes.GOOGLE);
        publisher.setUniqueId(publisher.getLogin() + "-" + publisher.getService());
        publisher.setFirstname("Publisher");
        publisher.setLastname(j + "-" + i);
        publisher.setPhone("+212522" + (100000 + rand.nextInt(999999)));
        publisher.setEmail("publisher" + j + "@company" + i + ".com");
        ArrayList<Long> products = new ArrayList<Long>();
        ArrayList<Long> slots = new ArrayList<Long>();
        publisherDAO.put(publisher);
        publisher.setCompanyId(company.getId());
        for (int k = 0; k < 5; k++) {
          Product product = new Product();
          product.setName("Product" + k + "-" + j + "-" + i);
          product.setSlogan("Slogan");
          product.setText("Text");
View Full Code Here

Examples of com.casamind.adware.server.domain.Company

        log.info("Rol added successfully!");
      }
      try {
        Publisher publisher = (Publisher) owner;
        log.info("Owner is a publisher. Adding company ACL entries...");
        Company company = DatastoreProxy.getCompanyById(publisher.getCompanyId());
        String cLogin = company.getLogin();
        if (cLogin != null && !"".equals(cLogin)) {
          log.info("Adding ACL.\n\tuser: " + cLogin + ".\n\trole: " + role);
          proxy.addAclRole(entry, cLogin, role);
          log.info("Rol added successfully!");
        }
        String cEmail = company.getEmail();
        if (cEmail != null && !"".equals(cEmail)) {
          log.info("Adding ACL.\n\tuser: " + cEmail + ".\n\trole: " + role);
          proxy.addAclRole(entry, cEmail, role);
          log.info("Rol added successfully!");
        }
View Full Code Here

Examples of com.casamind.adware.server.domain.Company

    return Company.toDTO(DatastoreProxy.getCompanyById(id));
  }

  @Override
  public CompanyDTO createCompany(CompanyDTO dto) {
    Company entity = Company.toEntity(null, dto);
    entity.setGdataLogin(gdataWebLogin);
    entity.setGdataPassword(gdataWebPassword);
    CompanyDTO returnedDTO = Company.toDTO((DatastoreProxy.createCompany(entity)));
    QueueFactory.getQueue("gdata").add(TaskOptions.Builder.withUrl("/tasks/gdata/reports").param("task", GoogleDocumentsTaskTypes.CREATE).param("title", returnedDTO.getUUID()).param("folder", ReportTypes.COMPANY));
    return returnedDTO;
  }
View Full Code Here

Examples of com.casamind.adware.server.domain.Company

        for (Product entity : DatastoreProxy.getProductsByPublisherId(publisher.getId())) {
          list.add(Product.toSummaryDTO(entity));
        }
      }
    } else if (accessLevel == AccessLevels.Company) {
      Company company = DatastoreProxy.getCompanyByLogin(login);
      if (company != null) {
        for (Publisher entity : DatastoreProxy.getPublishersByCompanyId(company.getId())) {
          list.add(Publisher.toSummaryDTO(entity));
        }
      }
    } else if (accessLevel == AccessLevels.Administrator) {
      for (Company entity : DatastoreProxy.getCompanies()) {
View Full Code Here

Examples of com.casamind.adware.server.domain.Company

      // get products by publisher
      for (Product entity : DatastoreProxy.getProductsByPublisherId(id)) {
        list.add(Product.toSummaryDTO(entity));
      }
    } else {
      Company company = DatastoreProxy.getCompanyById(id);
      if (company != null) {
        // get products by company
        for (Publisher pub : DatastoreProxy.getPublishersByCompanyId(id)) {
          for (Product product : DatastoreProxy.getProductsByPublisherId(pub.getId())) {
            list.add(Product.toSummaryDTO(product));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.