Examples of MissingEntityException


Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    @Override
    public ScheduleGroup modifyGroup(long scheduleGroupId, String name) {
        ScheduleGroup scheduleGroup = businessEntityDao.findById(ScheduleGroup.class, scheduleGroupId);
        if (scheduleGroup == null) {
            throw new MissingEntityException(ClusterGroup.class, scheduleGroupId);
        }

        scheduleGroup.setName(name);

        return scheduleGroup;
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

        ClusterGroup clusterGroup = null;
        if (parameters.getClusterGroupId() != null) {
            clusterGroup = businessEntityDao.findById(ClusterGroup.class, parameters.getClusterGroupId());
            if (clusterGroup == null) {
                throw new MissingEntityException(ClusterGroup.class, parameters.getClusterGroupId());
            }
        }

        ScheduleGroup scheduleGroup = businessEntityDao.findById(ScheduleGroup.class, parameters.getScheduleGroupId());
        if (scheduleGroup == null) {
            throw new MissingEntityException(ScheduleGroup.class, parameters.getScheduleGroupId());
        }

        Date now = chronometer.getCurrentMoment();

        ScheduleAction scheduleAction = new ScheduleAction();
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    @Override
    public void deleteJob(long scheduleJobId) {
        ScheduleJob scheduleJob = businessEntityDao.lockById(ScheduleJob.class, scheduleJobId);
        if (scheduleJob == null) {
            throw new MissingEntityException(ScheduleJob.class, scheduleJobId);
        }

        scheduleExecutionDao.detachJob(scheduleJob.getId());

        businessEntityDao.deleteById(ScheduleJob.class, scheduleJobId);
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    public ScheduleJob modifyJob(long scheduleJobId, ScheduleJobModifyParameters parameters) {
        BeanValidationUtils.checkValidity(parameters, beanValidator);

        ScheduleJob scheduleJob = businessEntityDao.lockById(ScheduleJob.class, scheduleJobId);
        if (scheduleJob == null) {
            throw new MissingEntityException(ScheduleJob.class, scheduleJobId);
        }

        Date now = chronometer.getCurrentMoment();

        scheduleJob.setName(parameters.getName());
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    public ScheduleJob changeJobAction(long scheduleJobId, ScheduleJobActionParameters parameters) {
        BeanValidationUtils.checkValidity(parameters, beanValidator);

        ScheduleJob scheduleJob = businessEntityDao.lockById(ScheduleJob.class, scheduleJobId);
        if (scheduleJob == null) {
            throw new MissingEntityException(ScheduleJob.class, scheduleJobId);
        }

        scheduleActionDao.deleteOrphaned();

        Date now = chronometer.getCurrentMoment();
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    @Override
    public ScheduleJob changeJobGroup(long scheduleJobId, long scheduleGroupId) {
        ScheduleJob scheduleJob = businessEntityDao.lockById(ScheduleJob.class, scheduleJobId);
        if (scheduleJob == null) {
            throw new MissingEntityException(ScheduleJob.class, scheduleJobId);
        }

        ScheduleGroup newScheduleGroup = businessEntityDao.lockById(ScheduleGroup.class, scheduleGroupId);
        if (newScheduleGroup == null) {
            throw new MissingEntityException(ScheduleGroup.class, scheduleGroupId);
        }

        Date now = chronometer.getCurrentMoment();

        ScheduleGroup oldScheduleGroup = scheduleJob.getGroup();
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    public ScheduleJob rescheduleJob(long scheduleJobId, ScheduleJobRescheduleParameters parameters) {
        BeanValidationUtils.checkValidity(parameters, beanValidator);

        ScheduleJob scheduleJob = businessEntityDao.lockById(ScheduleJob.class, scheduleJobId);
        if (scheduleJob == null) {
            throw new MissingEntityException(ScheduleJob.class, scheduleJobId);
        }

        Date now = chronometer.getCurrentMoment();

        scheduleJob.setCron(parameters.getCron());
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    @Override
    public ScheduleJob enableJob(long scheduleJobId) {
        ScheduleJob scheduleJob = businessEntityDao.lockById(ScheduleJob.class, scheduleJobId);
        if (scheduleJob == null) {
            throw new MissingEntityException(ScheduleJob.class, scheduleJobId);
        }

        if (scheduleJob.isEnabled()) {
            return scheduleJob;
        }
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    @Override
    public ScheduleJob disableJob(long scheduleJobId) {
        ScheduleJob scheduleJob = businessEntityDao.lockById(ScheduleJob.class, scheduleJobId);
        if (scheduleJob == null) {
            throw new MissingEntityException(ScheduleJob.class, scheduleJobId);
        }

        if (!scheduleJob.isEnabled()) {
            return scheduleJob;
        }
View Full Code Here

Examples of com.gainmatrix.lib.business.exception.MissingEntityException

    public ClusterGroup modifyGroup(long clusterGroupId, String name) {
        Preconditions.checkNotNull(name);

        ClusterGroup clusterGroup = businessEntityDao.lockById(ClusterGroup.class, clusterGroupId);
        if (clusterGroup == null) {
            throw new MissingEntityException(ClusterGroup.class, clusterGroupId);
        }

        clusterGroup.setName(name);

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