Examples of StampModel


Examples of open.dolphin.infomodel.StampModel

            }
        }
        if (stamp != null) {
            StampDelegater sdl = new StampDelegater();
            // Stamp モデルをデータベースから取ってくる
            StampModel sModel = sdl.getStamp(stamp.getStampId());
            // Stamp モデルから info モデルを作る
            IInfoModel iModel = (IInfoModel) BeanUtils.xmlDecode(sModel.getStampBytes());
            // info モデル(実体)と stamp(情報) を module model にセット
            mModel = new ModuleModel();
            mModel.setModel(iModel);
            mModel.setModuleInfo(stamp);
        }
View Full Code Here

Examples of open.dolphin.infomodel.StampModel

         */
        private String getHexStampBytes(String stampId){

            StampDelegater del = new StampDelegater();
            // スタンプの実態を取得
            StampModel model = del.getStamp(stampId);
            // データベースにない場合はnullを返す
            if (model == null){
                return null;
            }
            // stampBytesを返す
            byte[] stampBytes = model.getStampBytes();
            return HexBytesTool.bytesToHex(stampBytes);
        }
View Full Code Here

Examples of open.dolphin.infomodel.StampModel

            buildStampInfo(name, role, entity, editable, memo, id);

            if (id != null) {
                StampDelegater del = new StampDelegater();
                StampModel model = del.getStamp(id);

                // データベースにスタンプが存在しない場合は新たに作成して登録する。
                if (model == null) {
                    model = new StampModel();
                    long userId = Project.getUserModel().getId();
//                  String stampId = GUIDGenerator.generate(model);
//                  model.setId(stampId);
                    model.setId(id); // id 再利用
                    model.setEntity(entity);
                    model.setUserId(userId);
                    byte[] stampBytes = HexBytesTool.hexToBytes(stampHexBytes);
                    model.setStampBytes(stampBytes);
                    // 新たに作成したStampModelをデータベースに登録する
                    del.putStamp(model);
                    // infoのstampIdは新たに生成したものに置き換える
//                  info.setStampId(stampId);
                }
View Full Code Here

Examples of open.dolphin.infomodel.StampModel

       
        List<StampModel> ret = new ArrayList<StampModel>();
       
        try {
            for (String stampId : ids) {
                StampModel test = (StampModel) em.find(StampModel.class, stampId);
                ret.add(test);
            }
        } catch (Exception e) {
        }
       
View Full Code Here

Examples of open.dolphin.infomodel.StampModel

     * @param stampId 削除する StampModel の id
     * @return 削除件数
     */
    @Override
    public int removeStamp(String stampId) {
        StampModel exist = (StampModel) em.find(StampModel.class, stampId);
        em.remove(exist);
        return 1;
    }
View Full Code Here

Examples of open.dolphin.infomodel.StampModel

     */
    @Override
    public int removeStamp(List<String> ids) {  
        int cnt =0;
        for (String stampId : ids) {
            StampModel exist = (StampModel) em.find(StampModel.class, stampId);
            if (exist != null) { em.remove(exist); } // zombie stamps cause exist == null
            cnt++;
        }
        return cnt;
    }
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.