Examples of Account


Examples of org.xdemo.site.biz.portal.profile.bean.Account

  /* (non-Javadoc)
   * @see org.xdemo.site.system.base.IService#save(java.lang.Object)
   */
  @Override
  public void save() {
    Account a=new Account();
    a.setMailAddress("252878950@qq.com");
    a.setPassword("fdsafdsafdsafdsa");
    session.getCurrentSession().save(a);
  }
View Full Code Here

Examples of org.zanata.apicompat.rest.dto.Account

            @Override
            protected void onResponse(ClientResponse response) {
                assertThat(response.getStatus(), is(200)); // Ok
                assertJsonUnmarshal(response, Account.class);
                Account account = jsonUnmarshal(response, Account.class);

                // Assert correct parsing of all properties
                assertThat(account.getUsername(), is("demo"));
                assertThat(account.getApiKey(),
                        is("23456789012345678901234567890123"));
                assertThat(account.getEmail(), is("user1@localhost"));
                assertThat(account.getName(), is("Sample User"));
                assertThat(account.getPasswordHash(),
                        is("/9Se/pfHeUH8FJ4asBD6jQ=="));
                assertThat(account.getRoles().size(), is(1));
                // assertThat(account.getTribes().size(), is(1)); // Language
                // teams are not being returned
            }
        }.run();
    }
View Full Code Here

Examples of org.zanata.rest.dto.Account

        HAccount hAccount = accountDAO.getByUsername(username);
        if (hAccount == null) {
            return Response.status(Status.NOT_FOUND)
                    .entity("Username not found").build();
        }
        Account result = new Account();
        transfer(hAccount, result);

        log.debug("HTTP GET result :\n" + result);
        return Response.ok(result).build();
    }
View Full Code Here

Examples of rewards.internal.account.Account

    this.restaurantRepository = restaurantRepository;
    this.rewardRepository = rewardRepository;
  }

  public RewardConfirmation rewardAccountFor(Dining dining) {
    Account account = accountRepository.findByCreditCard(dining.getCreditCardNumber());
    Restaurant restaurant = restaurantRepository.findByMerchantNumber(dining.getMerchantNumber());
    MonetaryAmount amount = restaurant.calculateBenefitFor(account, dining);
    AccountContribution contribution = account.makeContribution(amount);
    accountRepository.updateBeneficiaries(account);
    return rewardRepository.confirmReward(contribution, dining);
  }
View Full Code Here

Examples of shared.account

          }
           catch (SystemException se)
     {
                  System.out.println("Exception : " + se.toString());
                 }
      account acc = new _tie_account(accImpl);
    record(name , accImpl);
    return acc;
  }
View Full Code Here

Examples of stateandbehavior.Account

public class AccountTest extends TestCase {
  private Account account;
 
  @Override
  protected void setUp() {
    account = new Account();
   
  }
View Full Code Here

Examples of vs.example.Account

        if (line.equals("create")) {
         
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
          Account account = (Account)rof.createRemoteObject(Account.class, line);   
          accounts.put(line, account);
          System.out.println("\taccount "+line+" created");
        }
        else if (line.equals("withdraw"))
        {
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
          Account account = accounts.get(line);
          if(account == null)
            System.out.println("\tno such account");
          else
          {
            System.out.println("\tspecify amount");
            System.out.print(">> ");
            line = bis.readLine();
            long amount = Long.parseLong(line);
            try {
              account.withdraw(amount);
              System.out.println("\tamount "+amount+" withdrawn");
            } catch (AccountException e) {
              System.out.println("Exception occured: class= " + e.getClass().getCanonicalName());
              System.out.println("Exception occured: message= " + e.getMessage());
            }
            catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
          }
        }
        else if (line.equals("deposit"))
        {
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
       
          Account account = accounts.get(line);
          if(account == null)
            System.out.println("\tno such account");
          else
          {
            System.out.println("\tspecify ammount");
            System.out.print(">> ");
            line = bis.readLine();
            long amount = Long.parseLong(line);
            try {
              account.deposit(amount);
              System.out.println("\tamount "+amount+" deposited");
            }
            catch (AccountException e) {
              System.out.println("Exception occured: class= " + e.getClass().getCanonicalName());
              System.out.println("Exception occured: message= " + e.getMessage());
            }
            catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
          }
        } 
        else if (line.equals("balance"))
        { 
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
       
          Account account = accounts.get(line);
          if(account == null)
            System.out.println("\tno such account");
          else
          {
            try{
              long balance = account.balance();
              System.out.println("\tbalance: "+balance);
            }catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
          }
        }
        else if (line.equals("number")) {
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
       
          Account account = accounts.get(line);
          if(account == null)
            System.out.println("\tno such account");
          else
          {
            try{
              String number = account.getAccountNumber();
              System.out.println("\tnumber: "+number);
            }catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
          }
        }
        else if (line.equals("partner")) {
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
       
          Account account = accounts.get(line);
          if(account == null)
            System.out.println("\tno such account");
          else
          {
            try{
              Partner partner = account.getPartner();
              if(partner == null)
              {
                System.out.println("\tno partner");
              }
              else
              {
                System.out.println("\tpartner");
                System.out.println("\tfirstname: "+partner.getFirstName());
                System.out.println("\tlastname: "+partner.getLastName());
              }
            }
            catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
          }
        }
        else if (line.equals("set number")) {
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
       
          Account account = accounts.get(line);
          if(account == null)
            System.out.println("\tno such account");
          else
          {
            String number = "";
            System.out.println("\tspecify number");
            System.out.print(">> ");
            number = bis.readLine();
           
            try{
              account.setAccountNumber(number);
              System.out.println("\tnumber set: "+number);
            }catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
          }
        }
        else if (line.equals("set partner")) {
          System.out.println("\tspecify account id");
          System.out.print(">> ");
          line = bis.readLine();
       
          Account account = accounts.get(line);
          if(account == null)
            System.out.println("\tno such account");
          else
          {
            String firstName = "";
            System.out.println("\tspecify first name");
            System.out.print(">> ");
            firstName = bis.readLine();
           
            String lastName = "";
            System.out.println("\tspecify last name");
            System.out.print(">> ");
            lastName = bis.readLine();
           
            try{
              Partner partner = new Partner(firstName, lastName);
              account.setPartner(partner);
              System.out.println("\tpartner set: "+partner);
            }catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
View Full Code Here

Examples of weibo4j.Account

  public static void main(String[] args) {
    Weibo weibo = new Weibo();
    String access_token = args[0];
    weibo.setToken(access_token.toString());
    Account am = new Account();
    try {
            JSONObject json = am.getAccountPrivacy();
      Log.logInfo(json.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of xpetstore.domain.Account

    protected void doValidation(  )
    {
        System.out.println( getClass(  ).getName(  ) + ".doValidation()" );

        /* Account */
        Account account = _customer.getAccount(  );
        checkLength( "customerId", "userId_length", account.getUserId(  ), 4 );
        checkLength( "password", "password_length", account.getPassword(  ), 4 );

        /* Email */
        checkNotEmpty( "email", "email_required", _customer.getEmail(  ) );

        /* Credit card */
 
View Full Code Here

Examples of za.co.javajoe.domain.Account

        System.out.println("====== Generating Account List" );



        Account acc = new Account();
        acc.setAccountID("1");
        acc.setAccountNumber("6222-12345");
        accountList.add(acc);

        acc = new Account();
        acc.setAccountID("2");
        acc.setAccountNumber("6333-12346");
        accountList.add(acc);

        acc = new Account();
        acc.setAccountID("3");
        acc.setAccountNumber("6444-12347");
        accountList.add(acc);

        System.out.println("====== Account List Created" );

        return  accountList;
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.