/* * Copyright 2010 The YAPULAN Software Foundation * * Licensed under the YAPULAN License, Version 2.0 (the "License"); */ package com.miniframe.system.model.dao; import com.ibatis.sqlmap.client.SqlMapClient; import com.miniframe.system.model.Platform; import com.miniframe.system.model.PlatformSQLBuilder; import java.sql.SQLException; import java.util.List; public class PlatformDAOImpl implements PlatformDAO { /** * 平台配置表 : 平台配置表 * @generated */ private SqlMapClient sqlMapClient; /** * @generated */ public PlatformDAOImpl(SqlMapClient sqlMapClient) { super(); this.sqlMapClient = sqlMapClient; } /** * 获取记录行数 * @generated */ public int countByExample(PlatformSQLBuilder example) throws SQLException { Integer count = (Integer) sqlMapClient.queryForObject("platform.countByExample", example); return count; } /** * 条件删除 * @generated */ public int deleteByExample(PlatformSQLBuilder example) throws SQLException { int rows = sqlMapClient.delete("platform.deleteByExample", example); return rows; } /** * 根据主键删除 * @generated */ public int deleteByPrimaryKey(String id) throws SQLException { Platform _key = new Platform(); _key.setId(id); int rows = sqlMapClient.delete("platform.deleteByPrimaryKey", _key); return rows; } /** * 插入,所有字段 * @generated */ public void insert(Platform record) throws SQLException { sqlMapClient.insert("platform.insert", record); } /** * 动态插入,忽略空字段 * @generated */ public void insertSelective(Platform record) throws SQLException { sqlMapClient.insert("platform.insertSelective", record); } /** * 条件查询 * @generated */ @SuppressWarnings("unchecked") public List selectByExample(PlatformSQLBuilder example) throws SQLException { List list = sqlMapClient.queryForList("platform.selectByExample", example); return list; } /** * 根据主键查询 * @generated */ public Platform selectByPrimaryKey(String id) throws SQLException { Platform _key = new Platform(); _key.setId(id); Object obj = sqlMapClient.queryForObject("platform.selectByPrimaryKey", _key); if(!(obj instanceof Platform)) return null; Platform record = (Platform) obj; return record; } /** * 动态修改,不包含空字段 * @generated */ public int updateByExampleSelective(Platform record, PlatformSQLBuilder example) throws SQLException { UpdateByExampleParms parms = new UpdateByExampleParms(record, example); int rows = sqlMapClient.update("platform.updateByExampleSelective", parms); return rows; } /** * 条件修改 * @generated */ public int updateByExample(Platform record, PlatformSQLBuilder example) throws SQLException { UpdateByExampleParms parms = new UpdateByExampleParms(record, example); int rows = sqlMapClient.update("platform.updateByExample", parms); return rows; } /** * 动态根据主键修改,为空字段不修改 * @generated */ public int updateByPrimaryKeySelective(Platform record) throws SQLException { int rows = sqlMapClient.update("platform.updateByPrimaryKeySelective", record); return rows; } /** * 根据主键修改 * @generated */ public int updateByPrimaryKey(Platform record) throws SQLException { int rows = sqlMapClient.update("platform.updateByPrimaryKey", record); return rows; } /** * 平台配置表 : 平台配置表 * @generated */ protected static class UpdateByExampleParms extends PlatformSQLBuilder { /** * 平台配置表 : 平台配置表 * @generated */ private Object record; /** * @generated */ public UpdateByExampleParms(Object record, PlatformSQLBuilder example) { super(example); this.record = record; } /** * @generated */ public Object getRecord() { return record; } } }