Package com.cin.entity

Examples of com.cin.entity.Occupation


  }
 
  public Occupation findOccupationCode(String pOccupation) {
    String aQuery = "select o from Occupation o where upper(trim(o.occupation)) =  '" + pOccupation.toUpperCase() + "' " ;
    Query aQueryObject = manager.createQuery(aQuery);
    Occupation anOccupation = (Occupation)aQueryObject.getSingleResult();
    return anOccupation;
  }
View Full Code Here


    return aInd;
  }
 
 
  public OccupationDTO findStabilityForOccupationCode(int pCode) {
    Occupation anEntity = (Occupation) manager.find(Occupation.class, pCode);
    OccupationDTO anDTO = null;
    if(anEntity != null) {
     
      anDTO = new OccupationDTO(anEntity);
    }
View Full Code Here

    int copySize = Math.min(resultSize, ejbList.size());
    List<OccupationDTO> dtoList = new ArrayList<OccupationDTO>(copySize);
   
   
    for( int i = 0; i < copySize; i++ ){
      Occupation ejb = (Occupation) ejbList.get(i);
      dtoList.add(new OccupationDTO( ejb) );
    }
    return dtoList;
  }
View Full Code Here

    }
    if((aOccCategory != null && !aOccCategory.equals("")) || aOccCode > 0) {
     
      if(aOccCategory != null) {
       
        Occupation anEntity = aTxnRemote.findOccupationCode(aOccCategory);
       
        if(anEntity != null) {
         
          aOccCode = anEntity.getOccupationcode();
        }
      }
      if((aIndCategory != null && !aIndCategory.equals("")) || aIndCode > 0) {
        if(aIndCategory != null) {
         
View Full Code Here

  public void setStability(int stability) {
    this.stability = stability;
  }
 
  public Occupation toEJB(){
    Occupation ejb = new Occupation();
    ejb.setOccupation(occupation);
    ejb.setOccupationcode(occupationCode);
    ejb.setStability(stability);
    return ejb;
  }
View Full Code Here

 
 
  @Test
  public final void testPersistOccupation() throws SQLException{
    try{
      Occupation occupation = new Occupation("my_occupation",123,60 );
      aRemote.persist(occupation);
    }finally{
     
    }
  }
View Full Code Here

  }
 
  private int findOccupationCode(String anOccupation) {
    try {
      Transaction transactionEjb = EJBLookup.getInstance().getTransactionEJB();
      Occupation occEntity = transactionEjb.findOccupationCode(anOccupation);
      if(occEntity != null) {
        return occEntity.getOccupationcode();
      }
    } catch (RemoteException e) {
      throw new EJBException(e);
    } catch (NamingException e) {
      throw new EJBException(e);
View Full Code Here

    {
      ejb = user.getJobDetails().toEJB(user.getSsn());
      persist(ejb);
    } else {
      Industry ind = new Industry();
      Occupation occ = new Occupation();
      ind.setIndustrycode(user.getJobDetails().getIndustryCode());
      occ.setOccupationcode(user.getJobDetails().getOccupationCode());
      ejb.setEmployersize(user.getJobDetails().getEmployerSize());
      ejb.setIndustry(ind);
      ejb.setOccupation(occ);
      ejb.setSelfemployed(user.getJobDetails().getSelfEmployed());
      ejb.setUnionmember(user.getJobDetails().getUnionMember());
View Full Code Here

    //based on occ categ/occ code & ind. categ./ind.code is requested.
    else if((aOccCategory != null && !aOccCategory.equals("")) || aOccCode > 0) {
      query = new StringBuilder();
      if(aOccCategory != null) {
       
        Occupation anEntity = aTxnRemote.findOccupationCode(aOccCategory);
       
        if(anEntity != null) {
         
          aOccCode = anEntity.getOccupationcode();
        }
      }
      if((aIndCategory != null && !aIndCategory.equals("")) || aIndCode > 0) {
        if(aIndCategory != null) {
         
View Full Code Here

TOP

Related Classes of com.cin.entity.Occupation

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.