Package com.centraview.contact.entity

Examples of com.centraview.contact.entity.EntityLocalHome


  {
    EntityVO ev = null;
    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
      EntityLocal remote =  home.findByPrimaryKey(new EntityPK(entId,this.dataSource));
      CommonHelperLocalHome chhome= (CommonHelperLocalHome)ic.lookup("local/CommonHelper");
      CommonHelperLocal commonhelper= chhome.create();
      // Explicitly set the dataSource on the stateless Session Bean.
      commonhelper.setDataSource(this.dataSource);
      ev = remote.getEntityVOWithBasicReferences();
View Full Code Here


  public int createEntity(EntityVO entityDetails, int ActionUserId)
  {
    int entityID = 0;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
      ctx.getUserTransaction().begin();
      EntityLocal remote =  home.create(entityDetails, ActionUserId, this.dataSource);
      EntityVO evo = remote.getEntityVOBasic();
      ctx.getUserTransaction().commit();

      entityID = evo.getContactID();
View Full Code Here

    if (! CVUtility.canPerformRecordOperation(individualID, "Entity", entityDetail.getContactID(), ModuleFieldRightMatrix.UPDATE_RIGHT, this.dataSource)) {
      throw new AuthorizationFailedException("Entity - updateEntity");
    }
    try {
        InitialContext ic = CVUtility.getInitialContext();
        EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
        EntityLocal remote = home.findByPrimaryKey(new EntityPK(entityDetail.getContactID(), this.dataSource));
 
        ctx.getUserTransaction().begin();
        remote.setEntityVO(entityDetail);
        ctx.getUserTransaction().commit();
 
View Full Code Here

      throw new AuthorizationFailedException("Entity - deleteEntity");
    }

    try{
      InitialContext ic = CVUtility.getInitialContext();
      EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
      EntityLocal remote =  home.findByPrimaryKey(new EntityPK(entityId,this.dataSource));

      EntityVO ev = remote.getEntityVOWithBasicReferences();

      HashMap hmDetails=new HashMap();
      hmDetails.put("title",ev.getName());
View Full Code Here

  {
    CVDal cvdl = new CVDal(this.dataSource);

    try{
      InitialContext ic = CVUtility.getInitialContext();
      EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
      cvdl.setSqlQuery("SELECT EntityID from entity where list="+listID);
      Collection results = cvdl.executeQuery();

      if (results != null)
      {
        Iterator iter = results.iterator();
        while (iter.hasNext())
        {
          HashMap entityList = (HashMap)iter.next();
          if (entityList != null)
          {
            int entityId = ((Number)entityList.get("EntityID")).intValue();
            EntityLocal remote =  home.findByPrimaryKey(new EntityPK(entityId,this.dataSource));
            ctx.getUserTransaction().begin();
            remote.remove();
            ctx.getUserTransaction().commit();
          }
        }
View Full Code Here

      }

      //for RelateEntity
      if (flvo.getRelateEntity() > 0) {
        try {
          EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
          EntityLocal remote = home.findByPrimaryKey(new EntityPK(flvo.getRelateEntity(), this.dataSource));
          flvo.setRelateEntityVO(remote.getEntityVOBasic());
        } catch (Exception e) {
          // do nothing if not found
        }
      }

      //for RelateIndividual
      if (flvo.getRelateIndividual() > 0) {
        try {
          IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
          IndividualLocal remote = home.findByPrimaryKey(new IndividualPK(flvo.getRelateIndividual(), this.dataSource));
          flvo.setRelateIndividualVO(remote.getIndividualVOBasic());
        } catch (Exception e) {
          // do nothing if not found
        }
      }
View Full Code Here

TOP

Related Classes of com.centraview.contact.entity.EntityLocalHome

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.