Package com.tll.service.entity.account

Examples of com.tll.service.entity.account.IAccountService


  public void testAccountHistoryRecordCreation() throws Exception {
    Account account = null;
    try {
      account = stubValidAccount(false);

      final IAccountService accountService = getEntityServiceFactory().instance(IAccountService.class);
      account = accountService.persist(account);

      getDbTrans().startTrans();
      final Criteria<AccountHistory> criteria = new Criteria<AccountHistory>(AccountHistory.class);
      criteria.getPrimaryGroup().addCriterion("account", Account.class, account.getId());
      final List<SearchResult> list = AbstractDbAwareTest.getEntitiesFromDb(getDao(), criteria);
View Full Code Here


   * Tests {@link IAccountService#getAccountHistoryDataProvider()}.
   * @throws Exception
   */
  @Test
  public void testAccountHistoryListHandlerDataProvider() throws Exception {
    final IAccountService accountService = getEntityServiceFactory().instance(IAccountService.class);

    Account account = stubValidAccount(false);
    account = accountService.persist(account);

    final IListingDataProvider<AccountHistory> dataProvider = accountService.getAccountHistoryDataProvider();

    final Criteria<AccountHistory> criteria = new Criteria<AccountHistory>(AccountHistory.class);
    criteria.getPrimaryGroup().addCriterion("account", Account.class, account.getId());

    final Sorting sorting = new Sorting("transDate");
View Full Code Here

    final Model m = super.entityToModel(entityType, e);
    assert m != null;
    final Account a = (Account) e;
    if(a.getParent() != null) {
      final PrimaryKey<Account> pk = new PrimaryKey<Account>(Account.class, a.getParent().getId());
      final IAccountService svc = context.getEntityServiceFactory().instance(IAccountService.class);
      final Account parent = svc.load(pk);
      final Model mparent = new Model(SmbizEntityType.ACCOUNT);
      mparent.set(new StringPropertyValue(Model.ID_PROPERTY, parent.getId()));
      mparent.set(new StringPropertyValue(Model.NAME_PROPERTY, parent.getName()));
      m.set(new RelatedOneProperty(SmbizEntityType.ACCOUNT, mparent, "parent", true));
    }
View Full Code Here

  public void testAccountHistoryRecordCreation() throws Exception {
    Account account = null;
    try {
      account = stubValidAccount(false);

      final IAccountService accountService = getEntityServiceFactory().instance(IAccountService.class);
      account = accountService.persist(account);

      getDbTrans().startTrans();
      final Criteria<AccountHistory> criteria = new Criteria<AccountHistory>(AccountHistory.class);
      criteria.getPrimaryGroup().addCriterion("account", new PrimaryKey<Account>(Account.class, account.getId()));
      final List<SearchResult<?>> list = AbstractDbAwareTest.getEntitiesFromDb(getDao(), criteria);
View Full Code Here

   * Tests {@link IAccountService#getAccountHistoryDataProvider()}.
   * @throws Exception
   */
  @Test
  public void testAccountHistoryListHandlerDataProvider() throws Exception {
    final IAccountService accountService = getEntityServiceFactory().instance(IAccountService.class);

    Account account = stubValidAccount(false);
    account = accountService.persist(account);

    final IListingDataProvider dataProvider = accountService.getAccountHistoryDataProvider();

    final Criteria<AccountHistory> criteria = new Criteria<AccountHistory>(AccountHistory.class);
    criteria.getPrimaryGroup().addCriterion("account", new PrimaryKey<Account>(Account.class, account.getId()));

    final Sorting sorting = new Sorting("transDate");
View Full Code Here

TOP

Related Classes of com.tll.service.entity.account.IAccountService

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.