Package com.alibaba.otter.manager.biz.config.datamatrix.dal.dataobject

Examples of com.alibaba.otter.manager.biz.config.datamatrix.dal.dataobject.DataMatrixDO


        transactionTemplate.execute(new TransactionCallbackWithoutResult() {

            protected void doInTransactionWithoutResult(TransactionStatus status) {

                try {
                    DataMatrixDO matrixlDO = modelToDo(matrix);
                    matrixlDO.setId(0L);
                    if (!dataMatrixDao.checkUnique(matrixlDO)) {
                        String exceptionCause = "exist the same repeat canal in the database.";
                        logger.warn("WARN ## " + exceptionCause);
                        throw new RepeatConfigureException(exceptionCause);
                    }
View Full Code Here


        transactionTemplate.execute(new TransactionCallbackWithoutResult() {

            protected void doInTransactionWithoutResult(TransactionStatus status) {

                try {
                    DataMatrixDO matrixDo = modelToDo(matrix);
                    if (dataMatrixDao.checkUnique(matrixDo)) {
                        dataMatrixDao.update(matrixDo);
                    } else {
                        String exceptionCause = "exist the same repeat matrix in the database.";
                        logger.warn("WARN ## " + exceptionCause);
View Full Code Here

        return canals.get(0);
    }

    public DataMatrix findByGroupKey(String groupKey) {
        Assert.assertNotNull(groupKey);
        DataMatrixDO matrixDo = dataMatrixDao.findByGroupKey(groupKey);
        if (matrixDo == null) {
            String exceptionCause = "query name:" + groupKey + " return null.";
            logger.error("ERROR ## " + exceptionCause);
            throw new ManagerException(exceptionCause);
        }
View Full Code Here

    /**
     * 用于Model对象转化为DO对象
     */
    private DataMatrixDO modelToDo(DataMatrix matrix) {
        DataMatrixDO matrixDo = new DataMatrixDO();
        try {
            matrixDo.setId(matrix.getId());
            matrixDo.setGroupKey(matrix.getGroupKey());
            matrixDo.setDescription(matrix.getDescription());
            matrixDo.setMaster(matrix.getMaster());
            matrixDo.setSlave(matrix.getSlave());
            matrixDo.setGmtCreate(matrix.getGmtCreate());
            matrixDo.setGmtModified(matrix.getGmtModified());
        } catch (Exception e) {
            logger.error("ERROR ## change the matrix Model to Do has an exception");
            throw new ManagerException(e);
        }
        return matrixDo;
View Full Code Here

TOP

Related Classes of com.alibaba.otter.manager.biz.config.datamatrix.dal.dataobject.DataMatrixDO

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.