Package au.com.motodetail.base.entity

Examples of au.com.motodetail.base.entity.BasicEntity


                    //TODO: if this is repeated on different function, switch to EAGER FETCH, drop LAZY
                    //TODO: read Apress JPA2: A better approach, which we will discuss in Chapters 7 and 8,
                    // is to use projection queries to retrieve only the entity state
                    //  that will be displayed on the JSP page instead of retrieving full entity instances.
                    //TODO: Named Query !!!
                    BasicEntity tempItem = itemService.retrieveFullEntity(itemEntity);
                    //itemSavedRoles = (List<BasicRole>) tempItem.getRoles();
                   
                    //replace item
                    this.item = tempItem;
                }
View Full Code Here


    //POST VIEW ACTIONS
    public String PostViewAction(String action, BasicEntity itemEntity)
    {
        log.warn("ItemBean::PostViewAction param: " + action);

        BasicEntity itemItem = new BasicEntity();
        switch(EntityAction.valueOf(action))
        {
            case CREATE:
                try
                {
View Full Code Here

    public void update(BasicEntity basicEntity) {
        BaseUtil.writeLog("BasicEntityServiceImpl::update ID: " + basicEntity.getId());
        JPAUtil.createTransactionalEntityManager();

        //retrieve basicEntity from db to merge
        BasicEntity basicEntityTemp = basicEntityDao.retrieve(basicEntity.getId());

        //modify here
        basicEntityTemp.setEntityType(basicEntity.getEntityType());
        basicEntityTemp.setRoles(basicEntity.getRoles());

        //commit changes
        basicEntityDao.update(basicEntityTemp);

        //commit transaction
View Full Code Here

    @Override
    public BasicEntity getById(Long id) {
        BaseUtil.writeLog("BasicEntityServiceImpl::getById ID: " + id);
        JPAUtil.createEntityManager();
        BasicEntity result = basicEntityDao.retrieve(id);
        JPAUtil.closeEntityManager();
        return result;
    }
View Full Code Here

TOP

Related Classes of au.com.motodetail.base.entity.BasicEntity

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.