repo stringclasses 1k
values | file_url stringlengths 96 373 | file_path stringlengths 11 294 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 6
values | commit_sha stringclasses 1k
values | retrieved_at stringdate 2026-01-04 14:45:56 2026-01-04 18:30:23 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/WebSiteUrlDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/WebSiteUrlDaoImpl.java | package com.roncoo.jui.common.dao.impl;
import com.roncoo.jui.common.dao.WebSiteUrlDao;
import com.roncoo.jui.common.entity.WebSiteUrl;
import com.roncoo.jui.common.entity.WebSiteUrlExample;
import com.roncoo.jui.common.mapper.WebSiteUrlMapper;
import com.roncoo.jui.common.util.PageUtil;
import com.roncoo.jui.common.util.jui.Page;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class WebSiteUrlDaoImpl implements WebSiteUrlDao {
@Autowired
private WebSiteUrlMapper webSiteUrlMapper;
public int save(WebSiteUrl record) {
return this.webSiteUrlMapper.insertSelective(record);
}
public int deleteById(Long id) {
return this.webSiteUrlMapper.deleteByPrimaryKey(id);
}
public int updateById(WebSiteUrl record) {
return this.webSiteUrlMapper.updateByPrimaryKeySelective(record);
}
public List<WebSiteUrl> listByExample(WebSiteUrlExample example) {
return this.webSiteUrlMapper.selectByExample(example);
}
public WebSiteUrl getById(Long id) {
return this.webSiteUrlMapper.selectByPrimaryKey(id);
}
public Page<WebSiteUrl> listForPage(int pageCurrent, int pageSize, WebSiteUrlExample example) {
int count = this.webSiteUrlMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<WebSiteUrl>(count, totalPage, pageCurrent, pageSize, this.webSiteUrlMapper.selectByExample(example));
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/ReportDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/ReportDaoImpl.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.dao.impl;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;
import com.roncoo.jui.common.dao.ReportDao;
import com.roncoo.jui.common.entity.RcReport;
import com.roncoo.jui.common.entity.RcReportExample;
import com.roncoo.jui.common.entity.RcReportExample.Criteria;
import com.roncoo.jui.common.mapper.RcReportMapper;
import com.roncoo.jui.common.util.SqlUtil;
import com.roncoo.jui.common.util.jui.Page;
/**
*
* @author wujing
*/
@Repository
public class ReportDaoImpl implements ReportDao {
@Autowired
private RcReportMapper mapper;
@Override
public Page<RcReport> listForPage(int currentPage, int numPerPage, String orderField, String orderDirection, RcReport rcReport) {
RcReportExample example = new RcReportExample();
Criteria c = example.createCriteria();
// 邮箱查询
if (StringUtils.hasText(rcReport.getUserEmail())) {
c.andUserEmailLike(SqlUtil.like(rcReport.getUserEmail()));
}
// 字段排序
StringBuilder orderByClause = new StringBuilder();
if (StringUtils.hasText(orderField)) {
orderByClause.append(orderField).append(" ").append(orderDirection).append(", ");
}
example.setOrderByClause(orderByClause.append("update_time desc").toString());
int totalCount = mapper.countByExample(example);
numPerPage = SqlUtil.checkPageSize(numPerPage);
currentPage = SqlUtil.checkPageCurrent(totalCount, numPerPage, currentPage);
example.setLimitStart(SqlUtil.countOffset(currentPage, numPerPage));
example.setPageSize(numPerPage);
Page<RcReport> page = new Page<RcReport>(totalCount, SqlUtil.countTotalPage(totalCount, numPerPage), currentPage, numPerPage, mapper.selectByExample(example));
page.setOrderField(orderField);
page.setOrderDirection(orderDirection);
return page;
}
@Override
public Integer insert(RcReport rcReport) {
rcReport.setStatusId("Y");
rcReport.setCreateTime(new Date());
rcReport.setUpdateTime(rcReport.getCreateTime());
rcReport.setSort(100);
return mapper.insertSelective(rcReport);
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysUserDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysUserDaoImpl.java | package com.roncoo.jui.common.dao.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.roncoo.jui.common.dao.SysUserDao;
import com.roncoo.jui.common.entity.SysUser;
import com.roncoo.jui.common.entity.SysUserExample;
import com.roncoo.jui.common.mapper.SysUserMapper;
import com.roncoo.jui.common.util.PageUtil;
import com.roncoo.jui.common.util.jui.Page;
import com.xiaoleilu.hutool.util.CollectionUtil;
@Repository
public class SysUserDaoImpl implements SysUserDao {
@Autowired
private SysUserMapper sysUserMapper;
@Override
public int save(SysUser record) {
return this.sysUserMapper.insertSelective(record);
}
@Override
public int deleteById(Long id) {
return this.sysUserMapper.deleteByPrimaryKey(id);
}
@Override
public int updateById(SysUser record) {
return this.sysUserMapper.updateByPrimaryKeySelective(record);
}
@Override
public SysUser getById(Long id) {
return this.sysUserMapper.selectByPrimaryKey(id);
}
@Override
public Page<SysUser> listForPage(int pageCurrent, int pageSize, SysUserExample example) {
int count = this.sysUserMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<SysUser>(count, totalPage, pageCurrent, pageSize, this.sysUserMapper.selectByExample(example));
}
@Override
public SysUser getByUserPhone(String userPhone) {
SysUserExample example = new SysUserExample();
example.createCriteria().andUserPhoneEqualTo(userPhone);
List<SysUser> list = this.sysUserMapper.selectByExample(example);
if (CollectionUtil.isNotEmpty(list)) {
return list.get(0);
}
return null;
}
@Override
public SysUser getByUserEmail(String userEmail) {
SysUserExample example = new SysUserExample();
example.createCriteria().andUserEmailEqualTo(userEmail);
List<SysUser> list = this.sysUserMapper.selectByExample(example);
if (CollectionUtil.isNotEmpty(list)) {
return list.get(0);
}
return null;
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/DataDictionaryListDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/DataDictionaryListDaoImpl.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.dao.impl;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;
import com.roncoo.jui.common.dao.DataDictionaryListDao;
import com.roncoo.jui.common.entity.RcDataDictionaryList;
import com.roncoo.jui.common.entity.RcDataDictionaryListExample;
import com.roncoo.jui.common.entity.RcDataDictionaryListExample.Criteria;
import com.roncoo.jui.common.mapper.RcDataDictionaryListMapper;
import com.roncoo.jui.common.util.SqlUtil;
import com.roncoo.jui.common.util.jui.Page;
/**
*
* @author wujing
*/
@Repository
public class DataDictionaryListDaoImpl implements DataDictionaryListDao {
@Autowired
private RcDataDictionaryListMapper mapper;
@Override
public Page<RcDataDictionaryList> listForPage(int currentPage, int numPerPage, String fieldCode, RcDataDictionaryList rcDataDictionaryList) {
RcDataDictionaryListExample example = new RcDataDictionaryListExample();
Criteria c = example.createCriteria();
c.andFieldCodeEqualTo(fieldCode);
// 字段查询
if (StringUtils.hasText(rcDataDictionaryList.getFieldKey())) {
c.andFieldKeyEqualTo(rcDataDictionaryList.getFieldKey());
}
// 字段排序
example.setOrderByClause("sort asc, update_time desc");
int totalCount = mapper.countByExample(example);
numPerPage = SqlUtil.checkPageSize(numPerPage);
currentPage = SqlUtil.checkPageCurrent(totalCount, numPerPage, currentPage);
example.setLimitStart(SqlUtil.countOffset(currentPage, numPerPage));
example.setPageSize(numPerPage);
return new Page<RcDataDictionaryList>(totalCount, SqlUtil.countTotalPage(totalCount, numPerPage), currentPage, numPerPage, mapper.selectByExample(example));
}
@Override
public int insert(RcDataDictionaryList rcDataDictionaryList) {
Date date = new Date();
rcDataDictionaryList.setCreateTime(date);
rcDataDictionaryList.setUpdateTime(date);
return mapper.insertSelective(rcDataDictionaryList);
}
@Override
public int deleteById(Long id) {
return mapper.deleteByPrimaryKey(id);
}
@Override
public int deleteByFieldCode(String fieldCode) {
RcDataDictionaryListExample example = new RcDataDictionaryListExample();
Criteria criteria = example.createCriteria();
criteria.andFieldCodeEqualTo(fieldCode);
return mapper.deleteByExample(example);
}
@Override
public RcDataDictionaryList selectById(Long id) {
return mapper.selectByPrimaryKey(id);
}
@Override
public int updateById(RcDataDictionaryList rcDataDictionaryList) {
rcDataDictionaryList.setUpdateTime(new Date());
return mapper.updateByPrimaryKeySelective(rcDataDictionaryList);
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysRoleUserDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysRoleUserDaoImpl.java | package com.roncoo.jui.common.dao.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.roncoo.jui.common.dao.SysRoleUserDao;
import com.roncoo.jui.common.entity.SysRoleUser;
import com.roncoo.jui.common.entity.SysRoleUserExample;
import com.roncoo.jui.common.mapper.SysRoleUserMapper;
import com.roncoo.jui.common.util.PageUtil;
import com.roncoo.jui.common.util.jui.Page;
@Repository
public class SysRoleUserDaoImpl implements SysRoleUserDao {
@Autowired
private SysRoleUserMapper sysRoleUserMapper;
@Override
public int save(SysRoleUser record) {
return this.sysRoleUserMapper.insertSelective(record);
}
@Override
public int deleteById(Long id) {
return this.sysRoleUserMapper.deleteByPrimaryKey(id);
}
@Override
public int updateById(SysRoleUser record) {
return this.sysRoleUserMapper.updateByPrimaryKeySelective(record);
}
@Override
public SysRoleUser getById(Long id) {
return this.sysRoleUserMapper.selectByPrimaryKey(id);
}
@Override
public Page<SysRoleUser> listForPage(int pageCurrent, int pageSize, SysRoleUserExample example) {
int count = this.sysRoleUserMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<SysRoleUser>(count, totalPage, pageCurrent, pageSize, this.sysRoleUserMapper.selectByExample(example));
}
@Override
public List<SysRoleUser> listByUserId(Long userId) {
SysRoleUserExample example = new SysRoleUserExample();
example.createCriteria().andUserIdEqualTo(userId);
return this.sysRoleUserMapper.selectByExample(example);
}
@Override
public int deleteByUserId(Long userId) {
SysRoleUserExample example = new SysRoleUserExample();
example.createCriteria().andUserIdEqualTo(userId);
return this.sysRoleUserMapper.deleteByExample(example);
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/DataDictionaryDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/DataDictionaryDaoImpl.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.dao.impl;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;
import com.roncoo.jui.common.dao.DataDictionaryDao;
import com.roncoo.jui.common.entity.RcDataDictionary;
import com.roncoo.jui.common.entity.RcDataDictionaryExample;
import com.roncoo.jui.common.entity.RcDataDictionaryExample.Criteria;
import com.roncoo.jui.common.mapper.RcDataDictionaryMapper;
import com.roncoo.jui.common.util.SqlUtil;
import com.roncoo.jui.common.util.jui.Page;
/**
*
* @author wujing
*/
@Repository
public class DataDictionaryDaoImpl implements DataDictionaryDao {
@Autowired
private RcDataDictionaryMapper mapper;
@Override
public Page<RcDataDictionary> listForPage(int currentPage, int numPerPage, String orderField, String orderDirection, RcDataDictionary rcDataDictionary) {
RcDataDictionaryExample example = new RcDataDictionaryExample();
Criteria c = example.createCriteria();
// 字段查询
if (StringUtils.hasText(rcDataDictionary.getFieldName())) {
c.andFieldNameLike(SqlUtil.like(rcDataDictionary.getFieldName()));
}
// 字段排序
StringBuilder orderByClause = new StringBuilder();
if (StringUtils.hasText(orderField)) {
orderByClause.append(orderField).append(" ").append(orderDirection).append(", ");
}
example.setOrderByClause(orderByClause.append("update_time desc").toString());
int totalCount = mapper.countByExample(example);
numPerPage = SqlUtil.checkPageSize(numPerPage);
currentPage = SqlUtil.checkPageCurrent(totalCount, numPerPage, currentPage);
example.setLimitStart(SqlUtil.countOffset(currentPage, numPerPage));
example.setPageSize(numPerPage);
Page<RcDataDictionary> page = new Page<RcDataDictionary>(totalCount, SqlUtil.countTotalPage(totalCount, numPerPage), currentPage, numPerPage, mapper.selectByExample(example));
page.setOrderField(orderField);
page.setOrderDirection(orderDirection);
return page;
}
@Override
public int insert(RcDataDictionary rcDataDictionary) {
rcDataDictionary.setStatusId("1");
rcDataDictionary.setCreateTime(new Date());
rcDataDictionary.setUpdateTime(rcDataDictionary.getCreateTime());
return mapper.insertSelective(rcDataDictionary);
}
@Override
public int deleteById(Long id) {
return mapper.deleteByPrimaryKey(id);
}
@Override
public RcDataDictionary selectById(Long id) {
return mapper.selectByPrimaryKey(id);
}
@Override
public int updateById(RcDataDictionary rcDataDictionary) {
rcDataDictionary.setUpdateTime(new Date());
return mapper.updateByPrimaryKeySelective(rcDataDictionary);
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/RcDataDictionaryDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/RcDataDictionaryDaoImpl.java | package com.roncoo.jui.common.dao.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.roncoo.jui.common.dao.RcDataDictionaryDao;
import com.roncoo.jui.common.entity.RcDataDictionary;
import com.roncoo.jui.common.entity.RcDataDictionaryExample;
import com.roncoo.jui.common.mapper.RcDataDictionaryMapper;
import com.roncoo.jui.common.util.PageUtil;
import com.roncoo.jui.common.util.jui.Page;
@Repository
public class RcDataDictionaryDaoImpl implements RcDataDictionaryDao {
@Autowired
private RcDataDictionaryMapper rcDataDictionaryMapper;
public int save(RcDataDictionary record) {
return this.rcDataDictionaryMapper.insertSelective(record);
}
public int deleteById(Long id) {
return this.rcDataDictionaryMapper.deleteByPrimaryKey(id);
}
public int updateById(RcDataDictionary record) {
return this.rcDataDictionaryMapper.updateByPrimaryKeySelective(record);
}
public RcDataDictionary getById(Long id) {
return this.rcDataDictionaryMapper.selectByPrimaryKey(id);
}
public Page<RcDataDictionary> listForPage(int pageCurrent, int pageSize, RcDataDictionaryExample example) {
int count = this.rcDataDictionaryMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<RcDataDictionary>(count, totalPage, pageCurrent, pageSize, this.rcDataDictionaryMapper.selectByExample(example));
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/WebSiteDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/WebSiteDaoImpl.java | package com.roncoo.jui.common.dao.impl;
import com.roncoo.jui.common.dao.WebSiteDao;
import com.roncoo.jui.common.entity.WebSite;
import com.roncoo.jui.common.entity.WebSiteExample;
import com.roncoo.jui.common.mapper.WebSiteMapper;
import com.roncoo.jui.common.util.PageUtil;
import com.roncoo.jui.common.util.jui.Page;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class WebSiteDaoImpl implements WebSiteDao {
@Autowired
private WebSiteMapper webSiteMapper;
public int save(WebSite record) {
return this.webSiteMapper.insertSelective(record);
}
public int deleteById(Long id) {
return this.webSiteMapper.deleteByPrimaryKey(id);
}
public int updateById(WebSite record) {
return this.webSiteMapper.updateByPrimaryKeySelective(record);
}
public List<WebSite> listByExample(WebSiteExample example) {
return this.webSiteMapper.selectByExample(example);
}
public WebSite getById(Long id) {
return this.webSiteMapper.selectByPrimaryKey(id);
}
public Page<WebSite> listForPage(int pageCurrent, int pageSize, WebSiteExample example) {
int count = this.webSiteMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<WebSite>(count, totalPage, pageCurrent, pageSize, this.webSiteMapper.selectByExample(example));
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysRoleDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysRoleDaoImpl.java | package com.roncoo.jui.common.dao.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.roncoo.jui.common.dao.SysRoleDao;
import com.roncoo.jui.common.entity.SysRole;
import com.roncoo.jui.common.entity.SysRoleExample;
import com.roncoo.jui.common.mapper.SysRoleMapper;
import com.roncoo.jui.common.util.PageUtil;
import com.roncoo.jui.common.util.jui.Page;
@Repository
public class SysRoleDaoImpl implements SysRoleDao {
@Autowired
private SysRoleMapper sysRoleMapper;
@Override
public int save(SysRole record) {
return this.sysRoleMapper.insertSelective(record);
}
@Override
public int deleteById(Long id) {
return this.sysRoleMapper.deleteByPrimaryKey(id);
}
@Override
public int updateById(SysRole record) {
return this.sysRoleMapper.updateByPrimaryKeySelective(record);
}
@Override
public SysRole getById(Long id) {
return this.sysRoleMapper.selectByPrimaryKey(id);
}
@Override
public Page<SysRole> listForPage(int pageCurrent, int pageSize, SysRoleExample example) {
int count = this.sysRoleMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<SysRole>(count, totalPage, pageCurrent, pageSize, this.sysRoleMapper.selectByExample(example));
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysMenuDaoImpl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/dao/impl/SysMenuDaoImpl.java | package com.roncoo.jui.common.dao.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.roncoo.jui.common.dao.SysMenuDao;
import com.roncoo.jui.common.entity.SysMenu;
import com.roncoo.jui.common.entity.SysMenuExample;
import com.roncoo.jui.common.mapper.SysMenuMapper;
import com.roncoo.jui.common.util.PageUtil;
import com.roncoo.jui.common.util.jui.Page;
@Repository
public class SysMenuDaoImpl implements SysMenuDao {
@Autowired
private SysMenuMapper sysMenuMapper;
@Override
public int save(SysMenu record) {
return this.sysMenuMapper.insertSelective(record);
}
@Override
public int deleteById(Long id) {
return this.sysMenuMapper.deleteByPrimaryKey(id);
}
@Override
public int updateById(SysMenu record) {
return this.sysMenuMapper.updateByPrimaryKeySelective(record);
}
@Override
public SysMenu getById(Long id) {
return this.sysMenuMapper.selectByPrimaryKey(id);
}
@Override
public Page<SysMenu> listForPage(int pageCurrent, int pageSize, SysMenuExample example) {
int count = this.sysMenuMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<SysMenu>(count, totalPage, pageCurrent, pageSize, this.sysMenuMapper.selectByExample(example));
}
@Override
public List<SysMenu> listByParentId(Long parentId) {
SysMenuExample example = new SysMenuExample();
example.createCriteria().andParentIdEqualTo(parentId);
example.setOrderByClause(" sort desc, id desc ");
return this.sysMenuMapper.selectByExample(example);
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/HttpUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/HttpUtil.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.databind.JsonNode;
/**
* Restful 调用工具类
*
* @author wujing
*/
public final class HttpUtil {
private HttpUtil() {
}
private static final Logger logger = LoggerFactory.getLogger(HttpUtil.class);
private static SimpleClientHttpRequestFactory requestFactory = null;
static {
requestFactory = new SimpleClientHttpRequestFactory();
requestFactory.setConnectTimeout(60000); // 连接超时时间,单位=毫秒
requestFactory.setReadTimeout(60000); // 读取超时时间,单位=毫秒
}
private static RestTemplate restTemplate = new RestTemplate(requestFactory);
public static JsonNode postForObject(String url, Map<String, Object> map) {
logger.info("POST 请求, url={},map={}", url, map.toString());
return restTemplate.postForObject(url, map, JsonNode.class);
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/MD5Util.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/MD5Util.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* MD5加密,使用UTF-8编码
*
* @author wujing
*/
public final class MD5Util {
private MD5Util() {
}
/**
* Used building output as Hex
*/
private static final char[] DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
/**
* 对字符串进行MD5加密, 默认使用UTF-8
*
* @param text
* 明文
* @return 密文
*/
public static String MD5(String text) {
return MD5(text, "UTF-8");
}
/**
* 对字符串进行MD5加密
*
* @param text
* 明文
* @param charsetName
* 指定编码
* @return 密文
*/
public static String MD5(String text, String charsetName) {
MessageDigest msgDigest = null;
try {
msgDigest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException("System doesn't support MD5 algorithm.");
}
try {
msgDigest.update(text.getBytes(charsetName)); // 注意是按照指定编码形式签名
} catch (UnsupportedEncodingException e) {
throw new IllegalStateException("System doesn't support your EncodingException.");
}
byte[] bytes = msgDigest.digest();
return new String(encodeHex(bytes));
}
private static char[] encodeHex(byte[] data) {
int l = data.length;
char[] out = new char[l << 1];
for (int i = 0, j = 0; i < l; i++) {
out[j++] = DIGITS[(0xF0 & data[i]) >>> 4];
out[j++] = DIGITS[0x0F & data[i]];
}
return out;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/PageUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/PageUtil.java | package com.roncoo.jui.common.util;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import com.roncoo.jui.common.util.jui.Page;
/**
* 分页
*
* @author wujing
* @param <T>
*/
public final class PageUtil<T extends Serializable> implements Serializable {
private static final long serialVersionUID = 1L;
private static final Logger logger = LoggerFactory.getLogger(PageUtil.class);
private PageUtil() {
}
/**
* 默认每页记录数(20)
*/
public static final int DEFAULT_PAGE_SIZE = 20;
/**
* 最大每页记录数(1000)
*/
public static final int MAX_PAGE_SIZE = 1000;
/**
* 检测sql,防止sql注入
*
* @param sql
* sql
* @return 正常返回sql;异常返回""
*/
public static String checkSql(String sql) {
String inj_str = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|;|or|+|,";
String inj_stra[] = inj_str.split("\\|");
for (int i = 0; i < inj_stra.length; i++) {
if (sql.indexOf(inj_stra[i]) >= 0) {
return "";
}
}
return sql;
}
/**
* 计算总页数
*
* @param totalCount
* 总记录数.
* @param pageSize
* 每页记录数.
* @return totalPage 总页数.
*/
public static int countTotalPage(final int totalCount, final int pageSize) {
if (totalCount == 0) {
return 1;
}
if (totalCount % pageSize == 0) {
return totalCount / pageSize; // 刚好整除
} else {
return totalCount / pageSize + 1; // 不能整除则总页数为:商 + 1
}
}
/**
* 校验当前页数pageCurrent<br/>
* 1、先根据总记录数totalCount和每页记录数pageSize,计算出总页数totalPage<br/>
* 2、判断页面提交过来的当前页数pageCurrent是否大于总页数totalPage,大于则返回totalPage<br/>
* 3、判断pageCurrent是否小于1,小于则返回1<br/>
* 4、其它则直接返回pageCurrent
*
* @param totalCount
* 要分页的总记录数
* @param pageSize
* 每页记录数大小
* @param pageCurrent
* 输入的当前页数
* @return pageCurrent
*/
public static int checkPageCurrent(int totalCount, int pageSize, int pageCurrent) {
int totalPage = countTotalPage(totalCount, pageSize); // 最大页数
if (pageCurrent > totalPage) {
// 如果页面提交过来的页数大于总页数,则将当前页设为总页数
// 此时要求totalPage要大于获等于1
if (totalPage < 1) {
return 1;
}
return totalPage;
} else if (pageCurrent < 1) {
return 1; // 当前页不能小于1(避免页面输入不正确值)
} else {
return pageCurrent;
}
}
/**
* 校验页面输入的每页记录数pageSize是否合法<br/>
* 1、当页面输入的每页记录数pageSize大于允许的最大每页记录数MAX_PAGE_SIZE时,返回MAX_PAGE_SIZE
* 2、如果pageSize小于1,则返回默认的每页记录数DEFAULT_PAGE_SIZE
*
* @param pageSize
* 页面输入的每页记录数
* @return checkPageSize
*/
public static int checkPageSize(int pageSize) {
if (pageSize > MAX_PAGE_SIZE) {
return MAX_PAGE_SIZE;
} else if (pageSize < 1) {
return DEFAULT_PAGE_SIZE;
} else {
return pageSize;
}
}
/**
* 计算当前分页的开始记录的索引
*
* @param pageCurrent
* 当前第几页
* @param pageSize
* 每页记录数
* @return 当前页开始记录号
*/
public static int countOffset(final int pageCurrent, final int pageSize) {
return (pageCurrent - 1) * pageSize;
}
/**
* 根据总记录数,对页面传来的分页参数进行校验,并返分页的SQL语句
*
* @param pageCurrent
* 当前页
* @param pageSize
* 每页记录数
* @param pageBean
* DWZ分页查询参数
* @return limitSql
*/
public static String limitSql(int totalCount, int pageCurrent, int pageSize) {
// 校验当前页数
pageCurrent = checkPageCurrent(totalCount, pageSize, pageCurrent);
pageSize = checkPageSize(pageSize); // 校验每页记录数
return new StringBuffer().append(" limit ").append(countOffset(pageCurrent, pageSize)).append(",").append(pageSize).toString();
}
/**
* 根据分页查询的SQL语句,获取统计总记录数的语句
*
* @param sql
* 分页查询的SQL
* @return countSql
*/
public static String countSql(String sql) {
String countSql = sql.substring(sql.toLowerCase().indexOf("from")); // 去除第一个from前的内容
return new StringBuffer().append("select count(*) ").append(removeOrderBy(countSql)).toString();
}
/**
* 移除SQL语句中的的order by子句(用于分页前获取总记录数,不需要排序)
*
* @param sql
* 原始SQL
* @return 去除order by子句后的内容
*/
private static String removeOrderBy(String sql) {
Pattern pat = Pattern.compile("order\\s*by[\\w|\\W|\\s|\\S]*", Pattern.CASE_INSENSITIVE);
Matcher mc = pat.matcher(sql);
StringBuffer strBuf = new StringBuffer();
while (mc.find()) {
mc.appendReplacement(strBuf, "");
}
mc.appendTail(strBuf);
return strBuf.toString();
}
/**
* 模糊查询
*
* @param str
* @return
*/
public static String like(String str) {
return new StringBuffer().append("%").append(str).append("%").toString();
}
public static <T extends Serializable> Page<T> transform(Page<?> page, Class<T> classType) {
Page<T> pb = new Page<>();
try {
pb.setList(copy(page.getList(), classType));
} catch (Exception e) {
logger.error("transform error", e);
}
pb.setCurrentPage(page.getCurrentPage());
pb.setNumPerPage(page.getNumPerPage());
pb.setTotalCount(page.getTotalCount());
pb.setTotalPage(page.getTotalPage());
pb.setOrderField(page.getOrderField());
pb.setOrderDirection(page.getOrderDirection());
return pb;
}
/**
* @param source
* @param clazz
* @return
* @throws IllegalAccessException
* @throws InvocationTargetException
* @throws InstantiationException
*/
public static <T> List<T> copy(List<?> source, Class<T> clazz) throws IllegalAccessException, InvocationTargetException, InstantiationException {
if (source.size() == 0) {
return Collections.emptyList();
}
List<T> res = new ArrayList<>(source.size());
for (Object o : source) {
T t = clazz.newInstance();
BeanUtils.copyProperties(o, t);
res.add(t);
}
return res;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/ArrayListUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/ArrayListUtil.java | package com.roncoo.jui.common.util;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.springframework.beans.BeanUtils;
/**
* 队列属性复制
*
* @author wujing
* @param <T>
*/
public final class ArrayListUtil<T extends Serializable> {
private ArrayListUtil() {
}
/**
* @param source
* @param clazz
* @return
* @throws IllegalAccessException
* @throws InvocationTargetException
* @throws InstantiationException
*/
public static <T> List<T> copy(List<?> source, Class<T> clazz) {
if (source.size() == 0) {
return Collections.emptyList();
}
List<T> res = new ArrayList<>(source.size());
for (Object o : source) {
T t = null;
try {
t = clazz.newInstance();
BeanUtils.copyProperties(o, t);
} catch (Exception e) {
e.printStackTrace();
}
res.add(t);
}
return res;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/JSONUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/JSONUtil.java | /**
* Copyright 2015-2016 广州市领课网络科技有限公司
*/
package com.roncoo.jui.common.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* @author wujing
*/
public final class JSONUtil {
private static final Logger logger = LoggerFactory.getLogger(JSONUtil.class);
private JSONUtil() {
}
public static String toJSONString(Object o) {
ObjectMapper m = new ObjectMapper();
try {
return m.writeValueAsString(o);
} catch (JsonProcessingException e) {
logger.error("json解析出错", e);
return "";
}
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/SqlUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/SqlUtil.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* sql工具类
*
* @author wujing
*/
public final class SqlUtil {
private SqlUtil() {
}
/**
* 默认每页记录数(20)
*/
public static final int DEFAULT_PAGE_SIZE = 20;
/**
* 最大每页记录数(1000)
*/
public static final int MAX_PAGE_SIZE = 1000;
/**
* 检测sql,防止sql注入
*
* @param sql
* sql
* @return 正常返回sql;异常返回""
*/
public static String checkSql(String sql) {
String inj_str = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|;|or|-|+|,";
String inj_stra[] = inj_str.split("\\|");
for (int i = 0; i < inj_stra.length; i++) {
if (sql.indexOf(inj_stra[i]) >= 0) {
return "";
}
}
return sql;
}
/**
* 计算总页数
*
* @param totalCount
* 总记录数.
* @param pageSize
* 每页记录数.
* @return totalPage 总页数.
*/
public static int countTotalPage(final int totalCount, final int pageSize) {
if (totalCount % pageSize == 0) {
return totalCount / pageSize; // 刚好整除
} else {
return totalCount / pageSize + 1; // 不能整除则总页数为:商 + 1
}
}
/**
* 校验当前页数pageCurrent<br/>
* 1、先根据总记录数totalCount和每页记录数pageSize,计算出总页数totalPage<br/>
* 2、判断页面提交过来的当前页数pageCurrent是否大于总页数totalPage,大于则返回totalPage<br/>
* 3、判断pageCurrent是否小于1,小于则返回1<br/>
* 4、其它则直接返回pageCurrent
*
* @param totalCount
* 要分页的总记录数
* @param pageSize
* 每页记录数大小
* @param pageCurrent
* 输入的当前页数
* @return pageCurrent
*/
public static int checkPageCurrent(int totalCount, int pageSize, int pageCurrent) {
int totalPage = countTotalPage(totalCount, pageSize); // 最大页数
if (pageCurrent > totalPage) {
// 如果页面提交过来的页数大于总页数,则将当前页设为总页数
// 此时要求totalPage要大于获等于1
if (totalPage < 1) {
return 1;
}
return totalPage;
} else if (pageCurrent < 1) {
return 1; // 当前页不能小于1(避免页面输入不正确值)
} else {
return pageCurrent;
}
}
/**
* 校验页面输入的每页记录数pageSize是否合法<br/>
* 1、当页面输入的每页记录数pageSize大于允许的最大每页记录数MAX_PAGE_SIZE时,返回MAX_PAGE_SIZE
* 2、如果pageSize小于1,则返回默认的每页记录数DEFAULT_PAGE_SIZE
*
* @param pageSize
* 页面输入的每页记录数
* @return checkPageSize
*/
public static int checkPageSize(int pageSize) {
if (pageSize > MAX_PAGE_SIZE) {
return MAX_PAGE_SIZE;
} else if (pageSize < 1) {
return DEFAULT_PAGE_SIZE;
} else {
return pageSize;
}
}
/**
* 计算当前分页的开始记录的索引
*
* @param pageCurrent
* 当前第几页
* @param pageSize
* 每页记录数
* @return 当前页开始记录号
*/
public static int countOffset(final int pageCurrent, final int pageSize) {
return (pageCurrent - 1) * pageSize;
}
/**
* 根据总记录数,对页面传来的分页参数进行校验,并返分页的SQL语句
*
* @param pageCurrent
* 当前页
* @param pageSize
* 每页记录数
* @param pageBean
* DWZ分页查询参数
* @return limitSql
*/
public static String limitSql(int totalCount, int pageCurrent, int pageSize) {
// 校验当前页数
pageCurrent = checkPageCurrent(totalCount, pageSize, pageCurrent);
pageSize = checkPageSize(pageSize); // 校验每页记录数
return new StringBuffer().append(" limit ").append(countOffset(pageCurrent, pageSize)).append(",").append(pageSize).toString();
}
/**
* 根据分页查询的SQL语句,获取统计总记录数的语句
*
* @param sql
* 分页查询的SQL
* @return countSql
*/
public static String countSql(String sql) {
String countSql = sql.substring(sql.toLowerCase().indexOf("from")); // 去除第一个from前的内容
return new StringBuffer().append("select count(*) ").append(removeOrderBy(countSql)).toString();
}
/**
* 移除SQL语句中的的order by子句(用于分页前获取总记录数,不需要排序)
*
* @param sql
* 原始SQL
* @return 去除order by子句后的内容
*/
private static String removeOrderBy(String sql) {
Pattern pat = Pattern.compile("order\\s*by[\\w|\\W|\\s|\\S]*", Pattern.CASE_INSENSITIVE);
Matcher mc = pat.matcher(sql);
StringBuffer strBuf = new StringBuffer();
while (mc.find()) {
mc.appendReplacement(strBuf, "");
}
mc.appendTail(strBuf);
return strBuf.toString();
}
/**
* 模糊查询
*
* @param str
* @return
*/
public static String like(String str) {
return new StringBuffer().append(str).append("%").toString();
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/DateUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/DateUtil.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
* 日期处理工具类
*
* @author wujing
*/
public final class DateUtil {
/**
* 此类不需要实例化
*/
private DateUtil() {
}
private static Date date = null;
private static DateFormat dateFormat = null;
private static Calendar calendar = null;
/**
* 时间转换:长整型转换为日期字符型
*
* @param format
* 格式化类型:yyyy-MM-dd
* @param time
* 13位有效数字:1380123456789
*
* @return 格式化结果 (yyyy-MM-dd)
*/
public static String formatToString(String format, long time) {
if (time == 0) {
return "";
}
return new SimpleDateFormat(format).format(new Date(time));
}
/**
* 时间转换:日期字符型转换为长整型
*
* @param format
* 格式化类型:yyyy-MM-dd
*
* @return 13位有效数字 (1380123456789)
*/
public static long formatToLong(String format) {
SimpleDateFormat f = new SimpleDateFormat(format);
return Timestamp.valueOf(f.format(new Date())).getTime();
}
/**
* 获取当前年份
*
* @return yyyy (2016)
*/
public static int getYear() {
Calendar cal = Calendar.getInstance();
return cal.get(Calendar.YEAR);
}
/**
* 获取当前月份
*
* @return MM (06)
*/
public static String getMonth() {
Calendar cal = Calendar.getInstance();
return new DecimalFormat("00").format(cal.get(Calendar.MONTH));
}
/**
* 功能描述:格式化日期
*
* @param dateStr
* String 字符型日期
* @param format
* String 格式
* @return Date 日期
*/
public static Date parseDate(String dateStr, String format) {
try {
dateFormat = new SimpleDateFormat(format);
String dt = dateStr.replaceAll("-", "/");
dt = dateStr;
if ((!dt.equals("")) && (dt.length() < format.length())) {
dt += format.substring(dt.length()).replaceAll("[YyMmDdHhSs]", "0");
}
date = (Date) dateFormat.parse(dt);
} catch (Exception e) {
e.printStackTrace();
}
return date;
}
/**
* 功能描述:格式化日期
*
* @param dateStr
* String 字符型日期:YYYY-MM-DD 格式
* @return Date
*/
public static Date parseDate(String dateStr) {
return parseDate(dateStr, "MM/dd/yyyy");
}
/**
* 功能描述:格式化输出日期
*
* @param date
* Date 日期
* @param format
* String 格式
* @return 返回字符型日期
*/
public static String format(Date date, String format) {
String result = "";
try {
if (date != null) {
dateFormat = new SimpleDateFormat(format);
result = dateFormat.format(date);
}
} catch (Exception e) {
}
return result;
}
/**
* 功能描述:
*
* @param date
* Date 日期
* @return
*/
public static String format(Date date) {
return format(date, "yyyy-MM-dd");
}
/**
* 功能描述:返回年份
*
* @param date
* Date 日期
* @return 返回年份
*/
public static int getYear(Date date) {
calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.YEAR);
}
/**
* 功能描述:返回月份
*
* @param date
* Date 日期
* @return 返回月份
*/
public static int getMonth(Date date) {
calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.MONTH) + 1;
}
/**
* 功能描述:返回日份
*
* @param date
* Date 日期
* @return 返回日份
*/
public static int getDay(Date date) {
calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.DAY_OF_MONTH);
}
/**
* 功能描述:返回小时
*
* @param date
* 日期
* @return 返回小时
*/
public static int getHour(Date date) {
calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.HOUR_OF_DAY);
}
/**
* 功能描述:返回分钟
*
* @param date
* 日期
* @return 返回分钟
*/
public static int getMinute(Date date) {
calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.MINUTE);
}
/**
* 返回秒钟
*
* @param date
* Date 日期
* @return 返回秒钟
*/
public static int getSecond(Date date) {
calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.SECOND);
}
/**
* 功能描述:返回毫秒
*
* @param date
* 日期
* @return 返回毫秒
*/
public static long getMillis(Date date) {
calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.getTimeInMillis();
}
/**
* 功能描述:返回字符型日期
*
* @param date
* 日期
* @return 返回字符型日期 yyyy-MM-dd 格式
*/
public static String getDate(Date date) {
return format(date, "yyyy-MM-dd");
}
/**
* 功能描述:返回字符型时间
*
* @param date
* Date 日期
* @return 返回字符型时间 HH:mm:ss 格式
*/
public static String getTime(Date date) {
return format(date, "HH:mm:ss");
}
/**
* 功能描述:返回字符型日期时间
*
* @param date
* Date 日期
* @return 返回字符型日期时间 yyyy-MM-dd HH:mm:ss 格式
*/
public static String getDateTime(Date date) {
return format(date, "yyyy-MM-dd HH:mm:ss");
}
/**
* 功能描述:日期相加
*
* @param date
* Date 日期
* @param day
* int 天数
* @return 返回相加后的日期
*/
public static Date addDate(Date date, int day) {
calendar = Calendar.getInstance();
long millis = getMillis(date) + ((long) day) * 24 * 3600 * 1000;
calendar.setTimeInMillis(millis);
return calendar.getTime();
}
/**
* 功能描述:日期相加
*
* @param date
* yyyy-MM-dd
* @param day
* int 天数
* @return 返回相加后的日期
* @throws ParseException
*/
public static String add(String date, int day) throws ParseException {
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
long d = df.parse(date).getTime();
long millis = d + ((long) day) * 24 * 3600 * 1000;
return df.format(new Date(millis));
}
/**
* 功能描述:日期相减
*
* @param date
* Date 日期
* @param date1
* Date 日期
* @return 返回相减后的日期
*/
public static int diffDate(Date date, Date date1) {
return (int) ((getMillis(date) - getMillis(date1)) / (24 * 3600 * 1000));
}
/**
* 功能描述:取得指定月份的第一天
*
* @param strdate
* String 字符型日期
* @return String yyyy-MM-dd 格式
*/
public static String getMonthBegin(String strdate) {
date = parseDate(strdate);
return format(date, "yyyy-MM") + "-01";
}
/**
* 功能描述:取得指定月份的最后一天
*
* @param strdate
* String 字符型日期
* @return String 日期字符串 yyyy-MM-dd格式
*/
public static String getMonthEnd(String strdate) {
date = parseDate(getMonthBegin(strdate));
calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.MONTH, 2);
calendar.add(Calendar.DAY_OF_YEAR, -1);
return formatDate(calendar.getTime());
}
/**
* 功能描述:常用的格式化日期
*
* @param date
* Date 日期
* @return String 日期字符串 yyyy-MM-dd格式
*/
public static String formatDate(Date date) {
return formatDateByFormat(date, "yyyy-MM-dd");
}
/**
* 以指定的格式来格式化日期
*
* @param date
* Date 日期
* @param format
* String 格式
* @return String 日期字符串
*/
public static String formatDateByFormat(Date date, String format) {
String result = "";
if (date != null) {
try {
SimpleDateFormat sdf = new SimpleDateFormat(format);
result = sdf.format(date);
} catch (Exception ex) {
ex.printStackTrace();
}
}
return result;
}
/**
* 计算日期之间的天数
*
* @param beginDate
* 开始日期 yyy-MM-dd
* @param endDate
* 结束日期 yyy-MM-dd
* @return
* @throws ParseException
*/
public static int getDay(String beginDate, String endDate) throws ParseException {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
long to = df.parse(endDate).getTime();
long from = df.parse(beginDate).getTime();
return (int) ((to - from) / (1000 * 60 * 60 * 24));
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/ConfUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/ConfUtil.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util;
import java.io.IOException;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 配置文件读取工具类
*
* @author wujing
*/
public final class ConfUtil {
private static final Logger logger = LoggerFactory.getLogger(ConfUtil.class);
private ConfUtil() {
}
/**
* 通过静态代码块读取上传文件的验证格式配置文件,静态代码块只执行一次(单例)
*/
private static Properties properties = new Properties();
// 通过类装载器装载进来
static {
try {
// 从类路径下读取属性文件
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("system.properties"));
} catch (IOException e) {
logger.error("读取配置文件出错", e);
}
}
/**
* 根据key读取value
*
* @param keyName
* key
* @return
*/
public static String getProperty(String keyName) {
return getProperty(keyName, "");
}
/**
* 根据key读取value,key为空,返回默认值
*
* @param keyName
* key
* @param defaultValue
* 默认值
* @return
*/
public static String getProperty(String keyName, String defaultValue) {
return properties.getProperty(keyName, defaultValue);
}
public static final String FILEPATH = getProperty("filePath");
public static final String USER = getProperty("user");
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/Constants.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/Constants.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util;
/**
* 常量工具类
*
* @author wujing
*/
public final class Constants {
private Constants() {
}
/**
* 常量
*
* @author wujing
*/
public interface Session {
public final static String USER = "user";
public final static String MENU = "menu";
}
/**
* 常量
*
* @author wujing
*/
public interface Token {
public final static String RONCOO = "roncoo";
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/filter/XSSFilter.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/filter/XSSFilter.java | package com.roncoo.jui.common.util.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import org.springframework.web.util.HtmlUtils;
/**
* 防止XSS攻击的过滤器
*
* @author wujing
*/
@WebFilter(filterName = "XSSFilter", urlPatterns = "/admin/**")
public class XSSFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest) request);
chain.doFilter(xssRequest, response);
}
@Override
public void destroy() {
}
}
/**
*
* @author wujing
*/
class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
/**
* @param request
*/
public XssHttpServletRequestWrapper(HttpServletRequest request) {
super(request);
}
@Override
public String[] getParameterValues(String name) {
String[] values = super.getParameterValues(name);
if (values != null) {
int length = values.length;
String[] escapseValues = new String[length];
for (int i = 0; i < length; i++) {
escapseValues[i] = HtmlUtils.htmlEscape(values[i]);
}
return escapseValues;
}
return super.getParameterValues(name);
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/jui/Page.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/jui/Page.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util.jui;
import java.io.Serializable;
import java.util.List;
/**
* 数据分页组件
*
* @author wujing
* @param <T>
*/
public class Page<T extends Serializable> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当前分页的数据集
*/
private List<T> list;
/**
* 总记录数
*/
private int totalCount;
/**
* 总页数
*/
private int totalPage;
/**
* 当前页
*/
private int currentPage;
/**
* 每页记录数
*/
private int numPerPage;
/**
* 排序字段
*/
private String orderField;
/**
* 排序方式:asc or desc
*/
private String orderDirection;
public Page() {
}
/**
* 构造函数
*
* @param totalCount
* 总记录数
* @param totalPage
* 总页数
* @param pageCurrent
* @param pageSize
* @param list
*/
public Page(int totalCount, int totalPage, int currentPage, int numPerPage, List<T> list) {
this.totalCount = totalCount;
this.totalPage = totalPage;
this.currentPage = currentPage;
this.numPerPage = numPerPage;
this.list = list;
}
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getCurrentPage() {
return currentPage;
}
public void setCurrentPage(int currentPage) {
this.currentPage = currentPage;
}
public int getNumPerPage() {
return numPerPage;
}
public void setNumPerPage(int numPerPage) {
this.numPerPage = numPerPage;
}
public String getOrderField() {
return orderField;
}
public void setOrderField(String orderField) {
this.orderField = orderField;
}
public String getOrderDirection() {
return orderDirection;
}
public void setOrderDirection(String orderDirection) {
this.orderDirection = orderDirection;
}
@Override
public String toString() {
return "Page [list=" + list + ", totalCount=" + totalCount + ", totalPage=" + totalPage + ", currentPage=" + currentPage + ", numPerPage=" + numPerPage + ", orderField=" + orderField + ", orderDirection=" + orderDirection + "]";
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/jui/Jui.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/jui/Jui.java | package com.roncoo.jui.common.util.jui;
import java.io.Serializable;
/**
* 封装jui
*
* @author wujing
*/
public class Jui implements Serializable {
private static final long serialVersionUID = 1L;
private int statusCode; // 必选。状态码
private String message; // 可选。信息内容。
private String navTabId; // 可选。
private String rel; // 可选。
private String callbackType; // 可选。callbackType="closeCurrent"关闭当前tab,callbackType="forward"需要forwardUrl值
private boolean forwardUrl; // 可选
private String confirmMsg; // 可选
/**
* @param navTabId
*/
public Jui() {
}
/**
* @param navTabId
*/
public Jui(int statusCode, String navTabId, String message, String callbackType) {
this.statusCode = statusCode;
this.navTabId = navTabId;
this.message = message;
this.callbackType = callbackType;
}
public int getStatusCode() {
return statusCode;
}
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getNavTabId() {
return navTabId;
}
public void setNavTabId(String navTabId) {
this.navTabId = navTabId;
}
public String getRel() {
return rel;
}
public void setRel(String rel) {
this.rel = rel;
}
public String getCallbackType() {
return callbackType;
}
public void setCallbackType(String callbackType) {
this.callbackType = callbackType;
}
public boolean isForwardUrl() {
return forwardUrl;
}
public void setForwardUrl(boolean forwardUrl) {
this.forwardUrl = forwardUrl;
}
public String getConfirmMsg() {
return confirmMsg;
}
public void setConfirmMsg(String confirmMsg) {
this.confirmMsg = confirmMsg;
}
@Override
public String toString() {
return "Jui [statusCode=" + statusCode + ", message=" + message + ", navTabId=" + navTabId + ", rel=" + rel + ", callbackType=" + callbackType + ", forwardUrl=" + forwardUrl + ", confirmMsg=" + confirmMsg + "]";
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/BaseController.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/BaseController.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util.base;
import java.text.MessageFormat;
import com.roncoo.jui.common.util.JSONUtil;
import com.roncoo.jui.common.util.jui.Jui;
/**
* 控制基础类,所以controller都应该继承这个类
*
* @author wujing
*/
public class BaseController extends Base {
public static final String TEXT_UTF8 = "text/html;charset=UTF-8";
public static final String JSON_UTF8 = "application/json;charset=UTF-8";
public static final String XML_UTF8 = "application/xml;charset=UTF-8";
public static final String LIST = "list";
public static final String VIEW = "view";
public static final String ADD = "add";
public static final String SAVE = "save";
public static final String EDIT = "edit";
public static final String UPDATE = "update";
public static final String DELETE = "delete";
public static final String PAGE = "page";
public static String redirect(String format, Object... arguments) {
return new StringBuffer("redirect:").append(MessageFormat.format(format, arguments)).toString();
}
public static String success(String navTabId) {
return JSONUtil.toJSONString(new Jui(200, navTabId, "操作成功", "closeCurrent"));
}
public static String delete(String navTabId) {
return JSONUtil.toJSONString(new Jui(200, navTabId, "操作成功", ""));
}
public static String error(String message) {
return JSONUtil.toJSONString(new Jui(300, "", message, ""));
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/RoncooException.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/RoncooException.java | package com.roncoo.jui.common.util.base;
/**
* 异常处理类
*
* @author wujing
*/
public class RoncooException extends RuntimeException {
private static final long serialVersionUID = 1L;
/** 异常码 */
protected int expCode;
/** 异常信息 */
protected String expMsg;
public RoncooException(int expCode, String expMsg) {
this.expCode = expCode;
this.expMsg = expMsg;
}
public int getExpCode() {
return expCode;
}
public void setExpCode(int expCode) {
this.expCode = expCode;
}
public String getExpMsg() {
return expMsg;
}
public void setExpMsg(String expMsg) {
this.expMsg = expMsg;
}
@Override
public String toString() {
return "BizException [expCode=" + expCode + ", expMsg=" + expMsg + "]";
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/Result.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/Result.java | package com.roncoo.jui.common.util.base;
import java.io.Serializable;
/**
* 接口返回对象实体
*
* @author wujing
* @param <T>
*/
public class Result<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 状态
*/
private boolean status = false;
/**
* 错误码
*/
private int errCode = 99;
/**
* 错误信息
*/
private String errMsg = "";
/**
* 返回结果实体
*/
private T resultData;
public Result() {
}
public boolean isStatus() {
return status;
}
public void setStatus(boolean status) {
this.status = status;
}
public int getErrCode() {
return errCode;
}
public void setErrCode(int errCode) {
this.errCode = errCode;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public T getResultData() {
return resultData;
}
public void setResultData(T resultData) {
this.resultData = resultData;
}
@Override
public String toString() {
return "Result [status=" + status + ", errCode=" + errCode + ", errMsg=" + errMsg + ", resultData=" + resultData + "]";
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/Base.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/base/Base.java | /*
* Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.roncoo.jui.common.util.base;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 基础类
*
* @author wujing
*/
public class Base {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/excel/ReportExcelUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/excel/ReportExcelUtil.java | /**
* Copyright 2015-2017 广州市领课网络科技有限公司
*/
package com.roncoo.jui.common.util.excel;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletOutputStream;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.roncoo.jui.common.entity.RcReport;
/**
* @author wujing
*/
public final class ReportExcelUtil {
private ReportExcelUtil() {
}
public static void exportExcel(String sheetName, String[] titles, List<RcReport> list, ServletOutputStream outputStream) {
// 创建一个workbook 对应一个excel文件
XSSFWorkbook workBook = new XSSFWorkbook();
// 在workbook中添加一个sheet,对应Excel文件中的sheet
XSSFSheet sheet = workBook.createSheet(sheetName);
ExcelUtil excelUtil = new ExcelUtil(workBook, sheet);
XSSFCellStyle headStyle = excelUtil.getHeadStyle();
XSSFCellStyle bodyStyle = excelUtil.getBodyStyle();
// 构建表头
XSSFRow headRow = sheet.createRow(0);
XSSFCell cell = null;
for (int i = 0; i < titles.length; i++) {
cell = headRow.createCell(i);
cell.setCellStyle(headStyle);
cell.setCellValue(titles[i]);
}
// 构建表体数据
if (list != null && list.size() > 0) {
for (int j = 0; j < list.size(); j++) {
XSSFRow bodyRow = sheet.createRow(j + 1);
RcReport bean = list.get(j);
cell = bodyRow.createCell(0);
cell.setCellStyle(bodyStyle);
cell.setCellValue(bean.getUserEmail());
cell = bodyRow.createCell(1);
cell.setCellStyle(bodyStyle);
cell.setCellValue(bean.getUserNickname());
}
}
try {
workBook.write(outputStream);
outputStream.flush();
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/excel/ExcelUtil.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/util/excel/ExcelUtil.java | package com.roncoo.jui.common.util.excel;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFFont;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public final class ExcelUtil {
private XSSFWorkbook wb = null;
private XSSFSheet sheet = null;
/**
* @param wb
* @param sheet
*/
public ExcelUtil(XSSFWorkbook wb, XSSFSheet sheet) {
this.wb = wb;
this.sheet = sheet;
}
/**
* 设置表头的单元格样式
*
* @return
*/
public XSSFCellStyle getHeadStyle() {
// 创建单元格样式
XSSFCellStyle cellStyle = wb.createCellStyle();
// 设置单元格的背景颜色为淡蓝色
cellStyle.setFillForegroundColor(HSSFColor.PALE_BLUE.index);
// 创建单元格内容显示不下时自动换行
//cellStyle.setWrapText(true);
// 设置单元格字体样式
XSSFFont font = wb.createFont();
// 设置字体加粗
font.setFontName("宋体");
font.setFontHeight((short) 200);
cellStyle.setFont(font);
return cellStyle;
}
/**
* 设置表体的单元格样式
*
* @return
*/
public XSSFCellStyle getBodyStyle() {
// 创建单元格样式
XSSFCellStyle cellStyle = wb.createCellStyle();
// 创建单元格内容显示不下时自动换行
//cellStyle.setWrapText(true);
// 设置单元格字体样式
XSSFFont font = wb.createFont();
// 设置字体加粗
font.setFontName("宋体");
font.setFontHeight((short) 200);
cellStyle.setFont(font);
return cellStyle;
}
public XSSFWorkbook getWb() {
return wb;
}
public void setWb(XSSFWorkbook wb) {
this.wb = wb;
}
public XSSFSheet getSheet() {
return sheet;
}
public void setSheet(XSSFSheet sheet) {
this.sheet = sheet;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenu.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenu.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class SysMenu implements Serializable {
private Long id;
private Date gmtCreate;
private Date gmtModified;
private String statusId;
private Integer sort;
private Long parentId;
private String menuName;
private String menuUrl;
private String targetName;
private String menuIcon;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName == null ? null : menuName.trim();
}
public String getMenuUrl() {
return menuUrl;
}
public void setMenuUrl(String menuUrl) {
this.menuUrl = menuUrl == null ? null : menuUrl.trim();
}
public String getTargetName() {
return targetName;
}
public void setTargetName(String targetName) {
this.targetName = targetName == null ? null : targetName.trim();
}
public String getMenuIcon() {
return menuIcon;
}
public void setMenuIcon(String menuIcon) {
this.menuIcon = menuIcon == null ? null : menuIcon.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", statusId=").append(statusId);
sb.append(", sort=").append(sort);
sb.append(", parentId=").append(parentId);
sb.append(", menuName=").append(menuName);
sb.append(", menuUrl=").append(menuUrl);
sb.append(", targetName=").append(targetName);
sb.append(", menuIcon=").append(menuIcon);
sb.append(", remark=").append(remark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSiteUrlExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSiteUrlExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class WebSiteUrlExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public WebSiteUrlExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
}
public Criteria andGmtCreateIsNotNull() {
addCriterion("gmt_create is not null");
return (Criteria) this;
}
public Criteria andGmtCreateEqualTo(Date value) {
addCriterion("gmt_create =", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotEqualTo(Date value) {
addCriterion("gmt_create <>", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThan(Date value) {
addCriterion("gmt_create >", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_create >=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThan(Date value) {
addCriterion("gmt_create <", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
addCriterion("gmt_create <=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateIn(List<Date> values) {
addCriterion("gmt_create in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotIn(List<Date> values) {
addCriterion("gmt_create not in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateBetween(Date value1, Date value2) {
addCriterion("gmt_create between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
addCriterion("gmt_create not between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNull() {
addCriterion("gmt_modified is null");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNotNull() {
addCriterion("gmt_modified is not null");
return (Criteria) this;
}
public Criteria andGmtModifiedEqualTo(Date value) {
addCriterion("gmt_modified =", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotEqualTo(Date value) {
addCriterion("gmt_modified <>", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThan(Date value) {
addCriterion("gmt_modified >", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_modified >=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThan(Date value) {
addCriterion("gmt_modified <", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
addCriterion("gmt_modified <=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedIn(List<Date> values) {
addCriterion("gmt_modified in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotIn(List<Date> values) {
addCriterion("gmt_modified not in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedBetween(Date value1, Date value2) {
addCriterion("gmt_modified between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
addCriterion("gmt_modified not between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSiteIdIsNull() {
addCriterion("site_id is null");
return (Criteria) this;
}
public Criteria andSiteIdIsNotNull() {
addCriterion("site_id is not null");
return (Criteria) this;
}
public Criteria andSiteIdEqualTo(Long value) {
addCriterion("site_id =", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdNotEqualTo(Long value) {
addCriterion("site_id <>", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdGreaterThan(Long value) {
addCriterion("site_id >", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdGreaterThanOrEqualTo(Long value) {
addCriterion("site_id >=", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdLessThan(Long value) {
addCriterion("site_id <", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdLessThanOrEqualTo(Long value) {
addCriterion("site_id <=", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdIn(List<Long> values) {
addCriterion("site_id in", values, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdNotIn(List<Long> values) {
addCriterion("site_id not in", values, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdBetween(Long value1, Long value2) {
addCriterion("site_id between", value1, value2, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdNotBetween(Long value1, Long value2) {
addCriterion("site_id not between", value1, value2, "siteId");
return (Criteria) this;
}
public Criteria andUrlNameIsNull() {
addCriterion("url_name is null");
return (Criteria) this;
}
public Criteria andUrlNameIsNotNull() {
addCriterion("url_name is not null");
return (Criteria) this;
}
public Criteria andUrlNameEqualTo(String value) {
addCriterion("url_name =", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameNotEqualTo(String value) {
addCriterion("url_name <>", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameGreaterThan(String value) {
addCriterion("url_name >", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameGreaterThanOrEqualTo(String value) {
addCriterion("url_name >=", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameLessThan(String value) {
addCriterion("url_name <", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameLessThanOrEqualTo(String value) {
addCriterion("url_name <=", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameLike(String value) {
addCriterion("url_name like", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameNotLike(String value) {
addCriterion("url_name not like", value, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameIn(List<String> values) {
addCriterion("url_name in", values, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameNotIn(List<String> values) {
addCriterion("url_name not in", values, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameBetween(String value1, String value2) {
addCriterion("url_name between", value1, value2, "urlName");
return (Criteria) this;
}
public Criteria andUrlNameNotBetween(String value1, String value2) {
addCriterion("url_name not between", value1, value2, "urlName");
return (Criteria) this;
}
public Criteria andUrlDescIsNull() {
addCriterion("url_desc is null");
return (Criteria) this;
}
public Criteria andUrlDescIsNotNull() {
addCriterion("url_desc is not null");
return (Criteria) this;
}
public Criteria andUrlDescEqualTo(String value) {
addCriterion("url_desc =", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescNotEqualTo(String value) {
addCriterion("url_desc <>", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescGreaterThan(String value) {
addCriterion("url_desc >", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescGreaterThanOrEqualTo(String value) {
addCriterion("url_desc >=", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescLessThan(String value) {
addCriterion("url_desc <", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescLessThanOrEqualTo(String value) {
addCriterion("url_desc <=", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescLike(String value) {
addCriterion("url_desc like", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescNotLike(String value) {
addCriterion("url_desc not like", value, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescIn(List<String> values) {
addCriterion("url_desc in", values, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescNotIn(List<String> values) {
addCriterion("url_desc not in", values, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescBetween(String value1, String value2) {
addCriterion("url_desc between", value1, value2, "urlDesc");
return (Criteria) this;
}
public Criteria andUrlDescNotBetween(String value1, String value2) {
addCriterion("url_desc not between", value1, value2, "urlDesc");
return (Criteria) this;
}
public Criteria andInNetIsNull() {
addCriterion("in_net is null");
return (Criteria) this;
}
public Criteria andInNetIsNotNull() {
addCriterion("in_net is not null");
return (Criteria) this;
}
public Criteria andInNetEqualTo(String value) {
addCriterion("in_net =", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetNotEqualTo(String value) {
addCriterion("in_net <>", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetGreaterThan(String value) {
addCriterion("in_net >", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetGreaterThanOrEqualTo(String value) {
addCriterion("in_net >=", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetLessThan(String value) {
addCriterion("in_net <", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetLessThanOrEqualTo(String value) {
addCriterion("in_net <=", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetLike(String value) {
addCriterion("in_net like", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetNotLike(String value) {
addCriterion("in_net not like", value, "inNet");
return (Criteria) this;
}
public Criteria andInNetIn(List<String> values) {
addCriterion("in_net in", values, "inNet");
return (Criteria) this;
}
public Criteria andInNetNotIn(List<String> values) {
addCriterion("in_net not in", values, "inNet");
return (Criteria) this;
}
public Criteria andInNetBetween(String value1, String value2) {
addCriterion("in_net between", value1, value2, "inNet");
return (Criteria) this;
}
public Criteria andInNetNotBetween(String value1, String value2) {
addCriterion("in_net not between", value1, value2, "inNet");
return (Criteria) this;
}
public Criteria andOutNetIsNull() {
addCriterion("out_net is null");
return (Criteria) this;
}
public Criteria andOutNetIsNotNull() {
addCriterion("out_net is not null");
return (Criteria) this;
}
public Criteria andOutNetEqualTo(String value) {
addCriterion("out_net =", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetNotEqualTo(String value) {
addCriterion("out_net <>", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetGreaterThan(String value) {
addCriterion("out_net >", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetGreaterThanOrEqualTo(String value) {
addCriterion("out_net >=", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetLessThan(String value) {
addCriterion("out_net <", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetLessThanOrEqualTo(String value) {
addCriterion("out_net <=", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetLike(String value) {
addCriterion("out_net like", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetNotLike(String value) {
addCriterion("out_net not like", value, "outNet");
return (Criteria) this;
}
public Criteria andOutNetIn(List<String> values) {
addCriterion("out_net in", values, "outNet");
return (Criteria) this;
}
public Criteria andOutNetNotIn(List<String> values) {
addCriterion("out_net not in", values, "outNet");
return (Criteria) this;
}
public Criteria andOutNetBetween(String value1, String value2) {
addCriterion("out_net between", value1, value2, "outNet");
return (Criteria) this;
}
public Criteria andOutNetNotBetween(String value1, String value2) {
addCriterion("out_net not between", value1, value2, "outNet");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRoleUserExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRoleUserExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysRoleUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public SysRoleUserExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
}
public Criteria andGmtCreateIsNotNull() {
addCriterion("gmt_create is not null");
return (Criteria) this;
}
public Criteria andGmtCreateEqualTo(Date value) {
addCriterion("gmt_create =", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotEqualTo(Date value) {
addCriterion("gmt_create <>", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThan(Date value) {
addCriterion("gmt_create >", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_create >=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThan(Date value) {
addCriterion("gmt_create <", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
addCriterion("gmt_create <=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateIn(List<Date> values) {
addCriterion("gmt_create in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotIn(List<Date> values) {
addCriterion("gmt_create not in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateBetween(Date value1, Date value2) {
addCriterion("gmt_create between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
addCriterion("gmt_create not between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNull() {
addCriterion("gmt_modified is null");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNotNull() {
addCriterion("gmt_modified is not null");
return (Criteria) this;
}
public Criteria andGmtModifiedEqualTo(Date value) {
addCriterion("gmt_modified =", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotEqualTo(Date value) {
addCriterion("gmt_modified <>", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThan(Date value) {
addCriterion("gmt_modified >", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_modified >=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThan(Date value) {
addCriterion("gmt_modified <", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
addCriterion("gmt_modified <=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedIn(List<Date> values) {
addCriterion("gmt_modified in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotIn(List<Date> values) {
addCriterion("gmt_modified not in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedBetween(Date value1, Date value2) {
addCriterion("gmt_modified between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
addCriterion("gmt_modified not between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andRoleIdIsNull() {
addCriterion("role_id is null");
return (Criteria) this;
}
public Criteria andRoleIdIsNotNull() {
addCriterion("role_id is not null");
return (Criteria) this;
}
public Criteria andRoleIdEqualTo(Long value) {
addCriterion("role_id =", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotEqualTo(Long value) {
addCriterion("role_id <>", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThan(Long value) {
addCriterion("role_id >", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
addCriterion("role_id >=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThan(Long value) {
addCriterion("role_id <", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThanOrEqualTo(Long value) {
addCriterion("role_id <=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdIn(List<Long> values) {
addCriterion("role_id in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotIn(List<Long> values) {
addCriterion("role_id not in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdBetween(Long value1, Long value2) {
addCriterion("role_id between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotBetween(Long value1, Long value2) {
addCriterion("role_id not between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRoleExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRoleExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysRoleExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public SysRoleExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
}
public Criteria andGmtCreateIsNotNull() {
addCriterion("gmt_create is not null");
return (Criteria) this;
}
public Criteria andGmtCreateEqualTo(Date value) {
addCriterion("gmt_create =", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotEqualTo(Date value) {
addCriterion("gmt_create <>", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThan(Date value) {
addCriterion("gmt_create >", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_create >=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThan(Date value) {
addCriterion("gmt_create <", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
addCriterion("gmt_create <=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateIn(List<Date> values) {
addCriterion("gmt_create in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotIn(List<Date> values) {
addCriterion("gmt_create not in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateBetween(Date value1, Date value2) {
addCriterion("gmt_create between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
addCriterion("gmt_create not between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNull() {
addCriterion("gmt_modified is null");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNotNull() {
addCriterion("gmt_modified is not null");
return (Criteria) this;
}
public Criteria andGmtModifiedEqualTo(Date value) {
addCriterion("gmt_modified =", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotEqualTo(Date value) {
addCriterion("gmt_modified <>", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThan(Date value) {
addCriterion("gmt_modified >", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_modified >=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThan(Date value) {
addCriterion("gmt_modified <", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
addCriterion("gmt_modified <=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedIn(List<Date> values) {
addCriterion("gmt_modified in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotIn(List<Date> values) {
addCriterion("gmt_modified not in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedBetween(Date value1, Date value2) {
addCriterion("gmt_modified between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
addCriterion("gmt_modified not between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andRoleNameIsNull() {
addCriterion("role_name is null");
return (Criteria) this;
}
public Criteria andRoleNameIsNotNull() {
addCriterion("role_name is not null");
return (Criteria) this;
}
public Criteria andRoleNameEqualTo(String value) {
addCriterion("role_name =", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotEqualTo(String value) {
addCriterion("role_name <>", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameGreaterThan(String value) {
addCriterion("role_name >", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameGreaterThanOrEqualTo(String value) {
addCriterion("role_name >=", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameLessThan(String value) {
addCriterion("role_name <", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameLessThanOrEqualTo(String value) {
addCriterion("role_name <=", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameLike(String value) {
addCriterion("role_name like", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotLike(String value) {
addCriterion("role_name not like", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameIn(List<String> values) {
addCriterion("role_name in", values, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotIn(List<String> values) {
addCriterion("role_name not in", values, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameBetween(String value1, String value2) {
addCriterion("role_name between", value1, value2, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotBetween(String value1, String value2) {
addCriterion("role_name not between", value1, value2, "roleName");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysUser.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysUser.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class SysUser implements Serializable {
private Long id;
private Date gmtCreate;
private Date gmtModified;
private String statusId;
private Integer sort;
private String userStatus;
private String userPhone;
private String userEmail;
private String userRealname;
private String userNickname;
private String userSex;
private String salt;
private String pwd;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getUserStatus() {
return userStatus;
}
public void setUserStatus(String userStatus) {
this.userStatus = userStatus == null ? null : userStatus.trim();
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone == null ? null : userPhone.trim();
}
public String getUserEmail() {
return userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail == null ? null : userEmail.trim();
}
public String getUserRealname() {
return userRealname;
}
public void setUserRealname(String userRealname) {
this.userRealname = userRealname == null ? null : userRealname.trim();
}
public String getUserNickname() {
return userNickname;
}
public void setUserNickname(String userNickname) {
this.userNickname = userNickname == null ? null : userNickname.trim();
}
public String getUserSex() {
return userSex;
}
public void setUserSex(String userSex) {
this.userSex = userSex == null ? null : userSex.trim();
}
public String getSalt() {
return salt;
}
public void setSalt(String salt) {
this.salt = salt == null ? null : salt.trim();
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd == null ? null : pwd.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", statusId=").append(statusId);
sb.append(", sort=").append(sort);
sb.append(", userStatus=").append(userStatus);
sb.append(", userPhone=").append(userPhone);
sb.append(", userEmail=").append(userEmail);
sb.append(", userRealname=").append(userRealname);
sb.append(", userNickname=").append(userNickname);
sb.append(", userSex=").append(userSex);
sb.append(", salt=").append(salt);
sb.append(", pwd=").append(pwd);
sb.append(", remark=").append(remark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysUserExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysUserExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public SysUserExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
}
public Criteria andGmtCreateIsNotNull() {
addCriterion("gmt_create is not null");
return (Criteria) this;
}
public Criteria andGmtCreateEqualTo(Date value) {
addCriterion("gmt_create =", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotEqualTo(Date value) {
addCriterion("gmt_create <>", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThan(Date value) {
addCriterion("gmt_create >", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_create >=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThan(Date value) {
addCriterion("gmt_create <", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
addCriterion("gmt_create <=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateIn(List<Date> values) {
addCriterion("gmt_create in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotIn(List<Date> values) {
addCriterion("gmt_create not in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateBetween(Date value1, Date value2) {
addCriterion("gmt_create between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
addCriterion("gmt_create not between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNull() {
addCriterion("gmt_modified is null");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNotNull() {
addCriterion("gmt_modified is not null");
return (Criteria) this;
}
public Criteria andGmtModifiedEqualTo(Date value) {
addCriterion("gmt_modified =", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotEqualTo(Date value) {
addCriterion("gmt_modified <>", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThan(Date value) {
addCriterion("gmt_modified >", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_modified >=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThan(Date value) {
addCriterion("gmt_modified <", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
addCriterion("gmt_modified <=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedIn(List<Date> values) {
addCriterion("gmt_modified in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotIn(List<Date> values) {
addCriterion("gmt_modified not in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedBetween(Date value1, Date value2) {
addCriterion("gmt_modified between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
addCriterion("gmt_modified not between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andUserStatusIsNull() {
addCriterion("user_status is null");
return (Criteria) this;
}
public Criteria andUserStatusIsNotNull() {
addCriterion("user_status is not null");
return (Criteria) this;
}
public Criteria andUserStatusEqualTo(String value) {
addCriterion("user_status =", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusNotEqualTo(String value) {
addCriterion("user_status <>", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusGreaterThan(String value) {
addCriterion("user_status >", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusGreaterThanOrEqualTo(String value) {
addCriterion("user_status >=", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusLessThan(String value) {
addCriterion("user_status <", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusLessThanOrEqualTo(String value) {
addCriterion("user_status <=", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusLike(String value) {
addCriterion("user_status like", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusNotLike(String value) {
addCriterion("user_status not like", value, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusIn(List<String> values) {
addCriterion("user_status in", values, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusNotIn(List<String> values) {
addCriterion("user_status not in", values, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusBetween(String value1, String value2) {
addCriterion("user_status between", value1, value2, "userStatus");
return (Criteria) this;
}
public Criteria andUserStatusNotBetween(String value1, String value2) {
addCriterion("user_status not between", value1, value2, "userStatus");
return (Criteria) this;
}
public Criteria andUserPhoneIsNull() {
addCriterion("user_phone is null");
return (Criteria) this;
}
public Criteria andUserPhoneIsNotNull() {
addCriterion("user_phone is not null");
return (Criteria) this;
}
public Criteria andUserPhoneEqualTo(String value) {
addCriterion("user_phone =", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotEqualTo(String value) {
addCriterion("user_phone <>", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneGreaterThan(String value) {
addCriterion("user_phone >", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneGreaterThanOrEqualTo(String value) {
addCriterion("user_phone >=", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLessThan(String value) {
addCriterion("user_phone <", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLessThanOrEqualTo(String value) {
addCriterion("user_phone <=", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLike(String value) {
addCriterion("user_phone like", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotLike(String value) {
addCriterion("user_phone not like", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneIn(List<String> values) {
addCriterion("user_phone in", values, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotIn(List<String> values) {
addCriterion("user_phone not in", values, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneBetween(String value1, String value2) {
addCriterion("user_phone between", value1, value2, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotBetween(String value1, String value2) {
addCriterion("user_phone not between", value1, value2, "userPhone");
return (Criteria) this;
}
public Criteria andUserEmailIsNull() {
addCriterion("user_email is null");
return (Criteria) this;
}
public Criteria andUserEmailIsNotNull() {
addCriterion("user_email is not null");
return (Criteria) this;
}
public Criteria andUserEmailEqualTo(String value) {
addCriterion("user_email =", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotEqualTo(String value) {
addCriterion("user_email <>", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailGreaterThan(String value) {
addCriterion("user_email >", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailGreaterThanOrEqualTo(String value) {
addCriterion("user_email >=", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailLessThan(String value) {
addCriterion("user_email <", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailLessThanOrEqualTo(String value) {
addCriterion("user_email <=", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailLike(String value) {
addCriterion("user_email like", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotLike(String value) {
addCriterion("user_email not like", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailIn(List<String> values) {
addCriterion("user_email in", values, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotIn(List<String> values) {
addCriterion("user_email not in", values, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailBetween(String value1, String value2) {
addCriterion("user_email between", value1, value2, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotBetween(String value1, String value2) {
addCriterion("user_email not between", value1, value2, "userEmail");
return (Criteria) this;
}
public Criteria andUserRealnameIsNull() {
addCriterion("user_realname is null");
return (Criteria) this;
}
public Criteria andUserRealnameIsNotNull() {
addCriterion("user_realname is not null");
return (Criteria) this;
}
public Criteria andUserRealnameEqualTo(String value) {
addCriterion("user_realname =", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameNotEqualTo(String value) {
addCriterion("user_realname <>", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameGreaterThan(String value) {
addCriterion("user_realname >", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameGreaterThanOrEqualTo(String value) {
addCriterion("user_realname >=", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameLessThan(String value) {
addCriterion("user_realname <", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameLessThanOrEqualTo(String value) {
addCriterion("user_realname <=", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameLike(String value) {
addCriterion("user_realname like", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameNotLike(String value) {
addCriterion("user_realname not like", value, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameIn(List<String> values) {
addCriterion("user_realname in", values, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameNotIn(List<String> values) {
addCriterion("user_realname not in", values, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameBetween(String value1, String value2) {
addCriterion("user_realname between", value1, value2, "userRealname");
return (Criteria) this;
}
public Criteria andUserRealnameNotBetween(String value1, String value2) {
addCriterion("user_realname not between", value1, value2, "userRealname");
return (Criteria) this;
}
public Criteria andUserNicknameIsNull() {
addCriterion("user_nickname is null");
return (Criteria) this;
}
public Criteria andUserNicknameIsNotNull() {
addCriterion("user_nickname is not null");
return (Criteria) this;
}
public Criteria andUserNicknameEqualTo(String value) {
addCriterion("user_nickname =", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotEqualTo(String value) {
addCriterion("user_nickname <>", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameGreaterThan(String value) {
addCriterion("user_nickname >", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameGreaterThanOrEqualTo(String value) {
addCriterion("user_nickname >=", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameLessThan(String value) {
addCriterion("user_nickname <", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameLessThanOrEqualTo(String value) {
addCriterion("user_nickname <=", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameLike(String value) {
addCriterion("user_nickname like", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotLike(String value) {
addCriterion("user_nickname not like", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameIn(List<String> values) {
addCriterion("user_nickname in", values, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotIn(List<String> values) {
addCriterion("user_nickname not in", values, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameBetween(String value1, String value2) {
addCriterion("user_nickname between", value1, value2, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotBetween(String value1, String value2) {
addCriterion("user_nickname not between", value1, value2, "userNickname");
return (Criteria) this;
}
public Criteria andUserSexIsNull() {
addCriterion("user_sex is null");
return (Criteria) this;
}
public Criteria andUserSexIsNotNull() {
addCriterion("user_sex is not null");
return (Criteria) this;
}
public Criteria andUserSexEqualTo(String value) {
addCriterion("user_sex =", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexNotEqualTo(String value) {
addCriterion("user_sex <>", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexGreaterThan(String value) {
addCriterion("user_sex >", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexGreaterThanOrEqualTo(String value) {
addCriterion("user_sex >=", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexLessThan(String value) {
addCriterion("user_sex <", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexLessThanOrEqualTo(String value) {
addCriterion("user_sex <=", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexLike(String value) {
addCriterion("user_sex like", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexNotLike(String value) {
addCriterion("user_sex not like", value, "userSex");
return (Criteria) this;
}
public Criteria andUserSexIn(List<String> values) {
addCriterion("user_sex in", values, "userSex");
return (Criteria) this;
}
public Criteria andUserSexNotIn(List<String> values) {
addCriterion("user_sex not in", values, "userSex");
return (Criteria) this;
}
public Criteria andUserSexBetween(String value1, String value2) {
addCriterion("user_sex between", value1, value2, "userSex");
return (Criteria) this;
}
public Criteria andUserSexNotBetween(String value1, String value2) {
addCriterion("user_sex not between", value1, value2, "userSex");
return (Criteria) this;
}
public Criteria andSaltIsNull() {
addCriterion("salt is null");
return (Criteria) this;
}
public Criteria andSaltIsNotNull() {
addCriterion("salt is not null");
return (Criteria) this;
}
public Criteria andSaltEqualTo(String value) {
addCriterion("salt =", value, "salt");
return (Criteria) this;
}
public Criteria andSaltNotEqualTo(String value) {
addCriterion("salt <>", value, "salt");
return (Criteria) this;
}
public Criteria andSaltGreaterThan(String value) {
addCriterion("salt >", value, "salt");
return (Criteria) this;
}
public Criteria andSaltGreaterThanOrEqualTo(String value) {
addCriterion("salt >=", value, "salt");
return (Criteria) this;
}
public Criteria andSaltLessThan(String value) {
addCriterion("salt <", value, "salt");
return (Criteria) this;
}
public Criteria andSaltLessThanOrEqualTo(String value) {
addCriterion("salt <=", value, "salt");
return (Criteria) this;
}
public Criteria andSaltLike(String value) {
addCriterion("salt like", value, "salt");
return (Criteria) this;
}
public Criteria andSaltNotLike(String value) {
addCriterion("salt not like", value, "salt");
return (Criteria) this;
}
public Criteria andSaltIn(List<String> values) {
addCriterion("salt in", values, "salt");
return (Criteria) this;
}
public Criteria andSaltNotIn(List<String> values) {
addCriterion("salt not in", values, "salt");
return (Criteria) this;
}
public Criteria andSaltBetween(String value1, String value2) {
addCriterion("salt between", value1, value2, "salt");
return (Criteria) this;
}
public Criteria andSaltNotBetween(String value1, String value2) {
addCriterion("salt not between", value1, value2, "salt");
return (Criteria) this;
}
public Criteria andPwdIsNull() {
addCriterion("pwd is null");
return (Criteria) this;
}
public Criteria andPwdIsNotNull() {
addCriterion("pwd is not null");
return (Criteria) this;
}
public Criteria andPwdEqualTo(String value) {
addCriterion("pwd =", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdNotEqualTo(String value) {
addCriterion("pwd <>", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdGreaterThan(String value) {
addCriterion("pwd >", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdGreaterThanOrEqualTo(String value) {
addCriterion("pwd >=", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdLessThan(String value) {
addCriterion("pwd <", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdLessThanOrEqualTo(String value) {
addCriterion("pwd <=", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdLike(String value) {
addCriterion("pwd like", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdNotLike(String value) {
addCriterion("pwd not like", value, "pwd");
return (Criteria) this;
}
public Criteria andPwdIn(List<String> values) {
addCriterion("pwd in", values, "pwd");
return (Criteria) this;
}
public Criteria andPwdNotIn(List<String> values) {
addCriterion("pwd not in", values, "pwd");
return (Criteria) this;
}
public Criteria andPwdBetween(String value1, String value2) {
addCriterion("pwd between", value1, value2, "pwd");
return (Criteria) this;
}
public Criteria andPwdNotBetween(String value1, String value2) {
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | true |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenuRole.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenuRole.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class SysMenuRole implements Serializable {
private Long id;
private Date gmtCreate;
private Date gmtModified;
private String statusId;
private Integer sort;
private Long menuId;
private Long roleId;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Long getMenuId() {
return menuId;
}
public void setMenuId(Long menuId) {
this.menuId = menuId;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", statusId=").append(statusId);
sb.append(", sort=").append(sort);
sb.append(", menuId=").append(menuId);
sb.append(", roleId=").append(roleId);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionary.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionary.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class RcDataDictionary implements Serializable {
private Long id;
private String statusId;
private Date createTime;
private Date updateTime;
private String fieldName;
private String fieldCode;
private Integer sort;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName == null ? null : fieldName.trim();
}
public String getFieldCode() {
return fieldCode;
}
public void setFieldCode(String fieldCode) {
this.fieldCode = fieldCode == null ? null : fieldCode.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", statusId=").append(statusId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", fieldName=").append(fieldName);
sb.append(", fieldCode=").append(fieldCode);
sb.append(", sort=").append(sort);
sb.append(", remark=").append(remark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRoleUser.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRoleUser.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class SysRoleUser implements Serializable {
private Long id;
private Date gmtCreate;
private Date gmtModified;
private String statusId;
private Integer sort;
private Long roleId;
private Long userId;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", statusId=").append(statusId);
sb.append(", sort=").append(sort);
sb.append(", roleId=").append(roleId);
sb.append(", userId=").append(userId);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSite.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSite.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class WebSite implements Serializable {
private Long id;
private Date gmtCreate;
private Date gmtModified;
private String statusId;
private Integer sort;
private String title;
private String siteLogo;
private String siteName;
private String siteDesc;
private String siteUrl;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getSiteLogo() {
return siteLogo;
}
public void setSiteLogo(String siteLogo) {
this.siteLogo = siteLogo == null ? null : siteLogo.trim();
}
public String getSiteName() {
return siteName;
}
public void setSiteName(String siteName) {
this.siteName = siteName == null ? null : siteName.trim();
}
public String getSiteDesc() {
return siteDesc;
}
public void setSiteDesc(String siteDesc) {
this.siteDesc = siteDesc == null ? null : siteDesc.trim();
}
public String getSiteUrl() {
return siteUrl;
}
public void setSiteUrl(String siteUrl) {
this.siteUrl = siteUrl == null ? null : siteUrl.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", statusId=").append(statusId);
sb.append(", sort=").append(sort);
sb.append(", title=").append(title);
sb.append(", siteLogo=").append(siteLogo);
sb.append(", siteName=").append(siteName);
sb.append(", siteDesc=").append(siteDesc);
sb.append(", siteUrl=").append(siteUrl);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSiteUrl.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSiteUrl.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class WebSiteUrl implements Serializable {
private Long id;
private Date gmtCreate;
private Date gmtModified;
private String statusId;
private Integer sort;
private Long siteId;
private String urlName;
private String urlDesc;
private String inNet;
private String outNet;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Long getSiteId() {
return siteId;
}
public void setSiteId(Long siteId) {
this.siteId = siteId;
}
public String getUrlName() {
return urlName;
}
public void setUrlName(String urlName) {
this.urlName = urlName == null ? null : urlName.trim();
}
public String getUrlDesc() {
return urlDesc;
}
public void setUrlDesc(String urlDesc) {
this.urlDesc = urlDesc == null ? null : urlDesc.trim();
}
public String getInNet() {
return inNet;
}
public void setInNet(String inNet) {
this.inNet = inNet == null ? null : inNet.trim();
}
public String getOutNet() {
return outNet;
}
public void setOutNet(String outNet) {
this.outNet = outNet == null ? null : outNet.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", statusId=").append(statusId);
sb.append(", sort=").append(sort);
sb.append(", siteId=").append(siteId);
sb.append(", urlName=").append(urlName);
sb.append(", urlDesc=").append(urlDesc);
sb.append(", inNet=").append(inNet);
sb.append(", outNet=").append(outNet);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcReport.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcReport.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class RcReport implements Serializable {
private Long id;
private String statusId;
private Date createTime;
private Date updateTime;
private Integer sort;
private String userEmail;
private String userNickname;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getUserEmail() {
return userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail == null ? null : userEmail.trim();
}
public String getUserNickname() {
return userNickname;
}
public void setUserNickname(String userNickname) {
this.userNickname = userNickname == null ? null : userNickname.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", statusId=").append(statusId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", sort=").append(sort);
sb.append(", userEmail=").append(userEmail);
sb.append(", userNickname=").append(userNickname);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenuExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenuExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysMenuExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public SysMenuExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
}
public Criteria andGmtCreateIsNotNull() {
addCriterion("gmt_create is not null");
return (Criteria) this;
}
public Criteria andGmtCreateEqualTo(Date value) {
addCriterion("gmt_create =", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotEqualTo(Date value) {
addCriterion("gmt_create <>", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThan(Date value) {
addCriterion("gmt_create >", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_create >=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThan(Date value) {
addCriterion("gmt_create <", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
addCriterion("gmt_create <=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateIn(List<Date> values) {
addCriterion("gmt_create in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotIn(List<Date> values) {
addCriterion("gmt_create not in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateBetween(Date value1, Date value2) {
addCriterion("gmt_create between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
addCriterion("gmt_create not between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNull() {
addCriterion("gmt_modified is null");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNotNull() {
addCriterion("gmt_modified is not null");
return (Criteria) this;
}
public Criteria andGmtModifiedEqualTo(Date value) {
addCriterion("gmt_modified =", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotEqualTo(Date value) {
addCriterion("gmt_modified <>", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThan(Date value) {
addCriterion("gmt_modified >", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_modified >=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThan(Date value) {
addCriterion("gmt_modified <", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
addCriterion("gmt_modified <=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedIn(List<Date> values) {
addCriterion("gmt_modified in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotIn(List<Date> values) {
addCriterion("gmt_modified not in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedBetween(Date value1, Date value2) {
addCriterion("gmt_modified between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
addCriterion("gmt_modified not between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andParentIdIsNull() {
addCriterion("parent_id is null");
return (Criteria) this;
}
public Criteria andParentIdIsNotNull() {
addCriterion("parent_id is not null");
return (Criteria) this;
}
public Criteria andParentIdEqualTo(Long value) {
addCriterion("parent_id =", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotEqualTo(Long value) {
addCriterion("parent_id <>", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdGreaterThan(Long value) {
addCriterion("parent_id >", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdGreaterThanOrEqualTo(Long value) {
addCriterion("parent_id >=", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdLessThan(Long value) {
addCriterion("parent_id <", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdLessThanOrEqualTo(Long value) {
addCriterion("parent_id <=", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdIn(List<Long> values) {
addCriterion("parent_id in", values, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotIn(List<Long> values) {
addCriterion("parent_id not in", values, "parentId");
return (Criteria) this;
}
public Criteria andParentIdBetween(Long value1, Long value2) {
addCriterion("parent_id between", value1, value2, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotBetween(Long value1, Long value2) {
addCriterion("parent_id not between", value1, value2, "parentId");
return (Criteria) this;
}
public Criteria andMenuNameIsNull() {
addCriterion("menu_name is null");
return (Criteria) this;
}
public Criteria andMenuNameIsNotNull() {
addCriterion("menu_name is not null");
return (Criteria) this;
}
public Criteria andMenuNameEqualTo(String value) {
addCriterion("menu_name =", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameNotEqualTo(String value) {
addCriterion("menu_name <>", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameGreaterThan(String value) {
addCriterion("menu_name >", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameGreaterThanOrEqualTo(String value) {
addCriterion("menu_name >=", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameLessThan(String value) {
addCriterion("menu_name <", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameLessThanOrEqualTo(String value) {
addCriterion("menu_name <=", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameLike(String value) {
addCriterion("menu_name like", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameNotLike(String value) {
addCriterion("menu_name not like", value, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameIn(List<String> values) {
addCriterion("menu_name in", values, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameNotIn(List<String> values) {
addCriterion("menu_name not in", values, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameBetween(String value1, String value2) {
addCriterion("menu_name between", value1, value2, "menuName");
return (Criteria) this;
}
public Criteria andMenuNameNotBetween(String value1, String value2) {
addCriterion("menu_name not between", value1, value2, "menuName");
return (Criteria) this;
}
public Criteria andMenuUrlIsNull() {
addCriterion("menu_url is null");
return (Criteria) this;
}
public Criteria andMenuUrlIsNotNull() {
addCriterion("menu_url is not null");
return (Criteria) this;
}
public Criteria andMenuUrlEqualTo(String value) {
addCriterion("menu_url =", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlNotEqualTo(String value) {
addCriterion("menu_url <>", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlGreaterThan(String value) {
addCriterion("menu_url >", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlGreaterThanOrEqualTo(String value) {
addCriterion("menu_url >=", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlLessThan(String value) {
addCriterion("menu_url <", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlLessThanOrEqualTo(String value) {
addCriterion("menu_url <=", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlLike(String value) {
addCriterion("menu_url like", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlNotLike(String value) {
addCriterion("menu_url not like", value, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlIn(List<String> values) {
addCriterion("menu_url in", values, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlNotIn(List<String> values) {
addCriterion("menu_url not in", values, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlBetween(String value1, String value2) {
addCriterion("menu_url between", value1, value2, "menuUrl");
return (Criteria) this;
}
public Criteria andMenuUrlNotBetween(String value1, String value2) {
addCriterion("menu_url not between", value1, value2, "menuUrl");
return (Criteria) this;
}
public Criteria andTargetNameIsNull() {
addCriterion("target_name is null");
return (Criteria) this;
}
public Criteria andTargetNameIsNotNull() {
addCriterion("target_name is not null");
return (Criteria) this;
}
public Criteria andTargetNameEqualTo(String value) {
addCriterion("target_name =", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameNotEqualTo(String value) {
addCriterion("target_name <>", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameGreaterThan(String value) {
addCriterion("target_name >", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameGreaterThanOrEqualTo(String value) {
addCriterion("target_name >=", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameLessThan(String value) {
addCriterion("target_name <", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameLessThanOrEqualTo(String value) {
addCriterion("target_name <=", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameLike(String value) {
addCriterion("target_name like", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameNotLike(String value) {
addCriterion("target_name not like", value, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameIn(List<String> values) {
addCriterion("target_name in", values, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameNotIn(List<String> values) {
addCriterion("target_name not in", values, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameBetween(String value1, String value2) {
addCriterion("target_name between", value1, value2, "targetName");
return (Criteria) this;
}
public Criteria andTargetNameNotBetween(String value1, String value2) {
addCriterion("target_name not between", value1, value2, "targetName");
return (Criteria) this;
}
public Criteria andMenuIconIsNull() {
addCriterion("menu_icon is null");
return (Criteria) this;
}
public Criteria andMenuIconIsNotNull() {
addCriterion("menu_icon is not null");
return (Criteria) this;
}
public Criteria andMenuIconEqualTo(String value) {
addCriterion("menu_icon =", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconNotEqualTo(String value) {
addCriterion("menu_icon <>", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconGreaterThan(String value) {
addCriterion("menu_icon >", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconGreaterThanOrEqualTo(String value) {
addCriterion("menu_icon >=", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconLessThan(String value) {
addCriterion("menu_icon <", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconLessThanOrEqualTo(String value) {
addCriterion("menu_icon <=", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconLike(String value) {
addCriterion("menu_icon like", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconNotLike(String value) {
addCriterion("menu_icon not like", value, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconIn(List<String> values) {
addCriterion("menu_icon in", values, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconNotIn(List<String> values) {
addCriterion("menu_icon not in", values, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconBetween(String value1, String value2) {
addCriterion("menu_icon between", value1, value2, "menuIcon");
return (Criteria) this;
}
public Criteria andMenuIconNotBetween(String value1, String value2) {
addCriterion("menu_icon not between", value1, value2, "menuIcon");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenuRoleExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysMenuRoleExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysMenuRoleExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public SysMenuRoleExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
}
public Criteria andGmtCreateIsNotNull() {
addCriterion("gmt_create is not null");
return (Criteria) this;
}
public Criteria andGmtCreateEqualTo(Date value) {
addCriterion("gmt_create =", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotEqualTo(Date value) {
addCriterion("gmt_create <>", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThan(Date value) {
addCriterion("gmt_create >", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_create >=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThan(Date value) {
addCriterion("gmt_create <", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
addCriterion("gmt_create <=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateIn(List<Date> values) {
addCriterion("gmt_create in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotIn(List<Date> values) {
addCriterion("gmt_create not in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateBetween(Date value1, Date value2) {
addCriterion("gmt_create between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
addCriterion("gmt_create not between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNull() {
addCriterion("gmt_modified is null");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNotNull() {
addCriterion("gmt_modified is not null");
return (Criteria) this;
}
public Criteria andGmtModifiedEqualTo(Date value) {
addCriterion("gmt_modified =", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotEqualTo(Date value) {
addCriterion("gmt_modified <>", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThan(Date value) {
addCriterion("gmt_modified >", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_modified >=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThan(Date value) {
addCriterion("gmt_modified <", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
addCriterion("gmt_modified <=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedIn(List<Date> values) {
addCriterion("gmt_modified in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotIn(List<Date> values) {
addCriterion("gmt_modified not in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedBetween(Date value1, Date value2) {
addCriterion("gmt_modified between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
addCriterion("gmt_modified not between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andMenuIdIsNull() {
addCriterion("menu_id is null");
return (Criteria) this;
}
public Criteria andMenuIdIsNotNull() {
addCriterion("menu_id is not null");
return (Criteria) this;
}
public Criteria andMenuIdEqualTo(Long value) {
addCriterion("menu_id =", value, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdNotEqualTo(Long value) {
addCriterion("menu_id <>", value, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdGreaterThan(Long value) {
addCriterion("menu_id >", value, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdGreaterThanOrEqualTo(Long value) {
addCriterion("menu_id >=", value, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdLessThan(Long value) {
addCriterion("menu_id <", value, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdLessThanOrEqualTo(Long value) {
addCriterion("menu_id <=", value, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdIn(List<Long> values) {
addCriterion("menu_id in", values, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdNotIn(List<Long> values) {
addCriterion("menu_id not in", values, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdBetween(Long value1, Long value2) {
addCriterion("menu_id between", value1, value2, "menuId");
return (Criteria) this;
}
public Criteria andMenuIdNotBetween(Long value1, Long value2) {
addCriterion("menu_id not between", value1, value2, "menuId");
return (Criteria) this;
}
public Criteria andRoleIdIsNull() {
addCriterion("role_id is null");
return (Criteria) this;
}
public Criteria andRoleIdIsNotNull() {
addCriterion("role_id is not null");
return (Criteria) this;
}
public Criteria andRoleIdEqualTo(Long value) {
addCriterion("role_id =", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotEqualTo(Long value) {
addCriterion("role_id <>", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThan(Long value) {
addCriterion("role_id >", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
addCriterion("role_id >=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThan(Long value) {
addCriterion("role_id <", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThanOrEqualTo(Long value) {
addCriterion("role_id <=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdIn(List<Long> values) {
addCriterion("role_id in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotIn(List<Long> values) {
addCriterion("role_id not in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdBetween(Long value1, Long value2) {
addCriterion("role_id between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotBetween(Long value1, Long value2) {
addCriterion("role_id not between", value1, value2, "roleId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionaryExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionaryExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RcDataDictionaryExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public RcDataDictionaryExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andFieldNameIsNull() {
addCriterion("field_name is null");
return (Criteria) this;
}
public Criteria andFieldNameIsNotNull() {
addCriterion("field_name is not null");
return (Criteria) this;
}
public Criteria andFieldNameEqualTo(String value) {
addCriterion("field_name =", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameNotEqualTo(String value) {
addCriterion("field_name <>", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameGreaterThan(String value) {
addCriterion("field_name >", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameGreaterThanOrEqualTo(String value) {
addCriterion("field_name >=", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameLessThan(String value) {
addCriterion("field_name <", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameLessThanOrEqualTo(String value) {
addCriterion("field_name <=", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameLike(String value) {
addCriterion("field_name like", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameNotLike(String value) {
addCriterion("field_name not like", value, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameIn(List<String> values) {
addCriterion("field_name in", values, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameNotIn(List<String> values) {
addCriterion("field_name not in", values, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameBetween(String value1, String value2) {
addCriterion("field_name between", value1, value2, "fieldName");
return (Criteria) this;
}
public Criteria andFieldNameNotBetween(String value1, String value2) {
addCriterion("field_name not between", value1, value2, "fieldName");
return (Criteria) this;
}
public Criteria andFieldCodeIsNull() {
addCriterion("field_code is null");
return (Criteria) this;
}
public Criteria andFieldCodeIsNotNull() {
addCriterion("field_code is not null");
return (Criteria) this;
}
public Criteria andFieldCodeEqualTo(String value) {
addCriterion("field_code =", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotEqualTo(String value) {
addCriterion("field_code <>", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeGreaterThan(String value) {
addCriterion("field_code >", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeGreaterThanOrEqualTo(String value) {
addCriterion("field_code >=", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeLessThan(String value) {
addCriterion("field_code <", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeLessThanOrEqualTo(String value) {
addCriterion("field_code <=", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeLike(String value) {
addCriterion("field_code like", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotLike(String value) {
addCriterion("field_code not like", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeIn(List<String> values) {
addCriterion("field_code in", values, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotIn(List<String> values) {
addCriterion("field_code not in", values, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeBetween(String value1, String value2) {
addCriterion("field_code between", value1, value2, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotBetween(String value1, String value2) {
addCriterion("field_code not between", value1, value2, "fieldCode");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionaryList.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionaryList.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class RcDataDictionaryList implements Serializable {
private Long id;
private String statusId;
private Date createTime;
private Date updateTime;
private String fieldCode;
private String fieldKey;
private String fieldValue;
private Integer sort;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getFieldCode() {
return fieldCode;
}
public void setFieldCode(String fieldCode) {
this.fieldCode = fieldCode == null ? null : fieldCode.trim();
}
public String getFieldKey() {
return fieldKey;
}
public void setFieldKey(String fieldKey) {
this.fieldKey = fieldKey == null ? null : fieldKey.trim();
}
public String getFieldValue() {
return fieldValue;
}
public void setFieldValue(String fieldValue) {
this.fieldValue = fieldValue == null ? null : fieldValue.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", statusId=").append(statusId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", fieldCode=").append(fieldCode);
sb.append(", fieldKey=").append(fieldKey);
sb.append(", fieldValue=").append(fieldValue);
sb.append(", sort=").append(sort);
sb.append(", remark=").append(remark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionaryListExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcDataDictionaryListExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RcDataDictionaryListExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public RcDataDictionaryListExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andFieldCodeIsNull() {
addCriterion("field_code is null");
return (Criteria) this;
}
public Criteria andFieldCodeIsNotNull() {
addCriterion("field_code is not null");
return (Criteria) this;
}
public Criteria andFieldCodeEqualTo(String value) {
addCriterion("field_code =", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotEqualTo(String value) {
addCriterion("field_code <>", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeGreaterThan(String value) {
addCriterion("field_code >", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeGreaterThanOrEqualTo(String value) {
addCriterion("field_code >=", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeLessThan(String value) {
addCriterion("field_code <", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeLessThanOrEqualTo(String value) {
addCriterion("field_code <=", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeLike(String value) {
addCriterion("field_code like", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotLike(String value) {
addCriterion("field_code not like", value, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeIn(List<String> values) {
addCriterion("field_code in", values, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotIn(List<String> values) {
addCriterion("field_code not in", values, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeBetween(String value1, String value2) {
addCriterion("field_code between", value1, value2, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldCodeNotBetween(String value1, String value2) {
addCriterion("field_code not between", value1, value2, "fieldCode");
return (Criteria) this;
}
public Criteria andFieldKeyIsNull() {
addCriterion("field_key is null");
return (Criteria) this;
}
public Criteria andFieldKeyIsNotNull() {
addCriterion("field_key is not null");
return (Criteria) this;
}
public Criteria andFieldKeyEqualTo(String value) {
addCriterion("field_key =", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyNotEqualTo(String value) {
addCriterion("field_key <>", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyGreaterThan(String value) {
addCriterion("field_key >", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyGreaterThanOrEqualTo(String value) {
addCriterion("field_key >=", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyLessThan(String value) {
addCriterion("field_key <", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyLessThanOrEqualTo(String value) {
addCriterion("field_key <=", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyLike(String value) {
addCriterion("field_key like", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyNotLike(String value) {
addCriterion("field_key not like", value, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyIn(List<String> values) {
addCriterion("field_key in", values, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyNotIn(List<String> values) {
addCriterion("field_key not in", values, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyBetween(String value1, String value2) {
addCriterion("field_key between", value1, value2, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldKeyNotBetween(String value1, String value2) {
addCriterion("field_key not between", value1, value2, "fieldKey");
return (Criteria) this;
}
public Criteria andFieldValueIsNull() {
addCriterion("field_value is null");
return (Criteria) this;
}
public Criteria andFieldValueIsNotNull() {
addCriterion("field_value is not null");
return (Criteria) this;
}
public Criteria andFieldValueEqualTo(String value) {
addCriterion("field_value =", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueNotEqualTo(String value) {
addCriterion("field_value <>", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueGreaterThan(String value) {
addCriterion("field_value >", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueGreaterThanOrEqualTo(String value) {
addCriterion("field_value >=", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueLessThan(String value) {
addCriterion("field_value <", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueLessThanOrEqualTo(String value) {
addCriterion("field_value <=", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueLike(String value) {
addCriterion("field_value like", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueNotLike(String value) {
addCriterion("field_value not like", value, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueIn(List<String> values) {
addCriterion("field_value in", values, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueNotIn(List<String> values) {
addCriterion("field_value not in", values, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueBetween(String value1, String value2) {
addCriterion("field_value between", value1, value2, "fieldValue");
return (Criteria) this;
}
public Criteria andFieldValueNotBetween(String value1, String value2) {
addCriterion("field_value not between", value1, value2, "fieldValue");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcReportExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/RcReportExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RcReportExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public RcReportExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andUserEmailIsNull() {
addCriterion("user_email is null");
return (Criteria) this;
}
public Criteria andUserEmailIsNotNull() {
addCriterion("user_email is not null");
return (Criteria) this;
}
public Criteria andUserEmailEqualTo(String value) {
addCriterion("user_email =", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotEqualTo(String value) {
addCriterion("user_email <>", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailGreaterThan(String value) {
addCriterion("user_email >", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailGreaterThanOrEqualTo(String value) {
addCriterion("user_email >=", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailLessThan(String value) {
addCriterion("user_email <", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailLessThanOrEqualTo(String value) {
addCriterion("user_email <=", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailLike(String value) {
addCriterion("user_email like", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotLike(String value) {
addCriterion("user_email not like", value, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailIn(List<String> values) {
addCriterion("user_email in", values, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotIn(List<String> values) {
addCriterion("user_email not in", values, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailBetween(String value1, String value2) {
addCriterion("user_email between", value1, value2, "userEmail");
return (Criteria) this;
}
public Criteria andUserEmailNotBetween(String value1, String value2) {
addCriterion("user_email not between", value1, value2, "userEmail");
return (Criteria) this;
}
public Criteria andUserNicknameIsNull() {
addCriterion("user_nickname is null");
return (Criteria) this;
}
public Criteria andUserNicknameIsNotNull() {
addCriterion("user_nickname is not null");
return (Criteria) this;
}
public Criteria andUserNicknameEqualTo(String value) {
addCriterion("user_nickname =", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotEqualTo(String value) {
addCriterion("user_nickname <>", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameGreaterThan(String value) {
addCriterion("user_nickname >", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameGreaterThanOrEqualTo(String value) {
addCriterion("user_nickname >=", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameLessThan(String value) {
addCriterion("user_nickname <", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameLessThanOrEqualTo(String value) {
addCriterion("user_nickname <=", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameLike(String value) {
addCriterion("user_nickname like", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotLike(String value) {
addCriterion("user_nickname not like", value, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameIn(List<String> values) {
addCriterion("user_nickname in", values, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotIn(List<String> values) {
addCriterion("user_nickname not in", values, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameBetween(String value1, String value2) {
addCriterion("user_nickname between", value1, value2, "userNickname");
return (Criteria) this;
}
public Criteria andUserNicknameNotBetween(String value1, String value2) {
addCriterion("user_nickname not between", value1, value2, "userNickname");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSiteExample.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/WebSiteExample.java | package com.roncoo.jui.common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class WebSiteExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int pageSize = -1;
public WebSiteExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setPageSize(int pageSize) {
this.pageSize=pageSize;
}
public int getPageSize() {
return pageSize;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
}
public Criteria andGmtCreateIsNotNull() {
addCriterion("gmt_create is not null");
return (Criteria) this;
}
public Criteria andGmtCreateEqualTo(Date value) {
addCriterion("gmt_create =", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotEqualTo(Date value) {
addCriterion("gmt_create <>", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThan(Date value) {
addCriterion("gmt_create >", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_create >=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThan(Date value) {
addCriterion("gmt_create <", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
addCriterion("gmt_create <=", value, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateIn(List<Date> values) {
addCriterion("gmt_create in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotIn(List<Date> values) {
addCriterion("gmt_create not in", values, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateBetween(Date value1, Date value2) {
addCriterion("gmt_create between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
addCriterion("gmt_create not between", value1, value2, "gmtCreate");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNull() {
addCriterion("gmt_modified is null");
return (Criteria) this;
}
public Criteria andGmtModifiedIsNotNull() {
addCriterion("gmt_modified is not null");
return (Criteria) this;
}
public Criteria andGmtModifiedEqualTo(Date value) {
addCriterion("gmt_modified =", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotEqualTo(Date value) {
addCriterion("gmt_modified <>", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThan(Date value) {
addCriterion("gmt_modified >", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
addCriterion("gmt_modified >=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThan(Date value) {
addCriterion("gmt_modified <", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
addCriterion("gmt_modified <=", value, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedIn(List<Date> values) {
addCriterion("gmt_modified in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotIn(List<Date> values) {
addCriterion("gmt_modified not in", values, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedBetween(Date value1, Date value2) {
addCriterion("gmt_modified between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
addCriterion("gmt_modified not between", value1, value2, "gmtModified");
return (Criteria) this;
}
public Criteria andStatusIdIsNull() {
addCriterion("status_id is null");
return (Criteria) this;
}
public Criteria andStatusIdIsNotNull() {
addCriterion("status_id is not null");
return (Criteria) this;
}
public Criteria andStatusIdEqualTo(String value) {
addCriterion("status_id =", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotEqualTo(String value) {
addCriterion("status_id <>", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThan(String value) {
addCriterion("status_id >", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdGreaterThanOrEqualTo(String value) {
addCriterion("status_id >=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThan(String value) {
addCriterion("status_id <", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLessThanOrEqualTo(String value) {
addCriterion("status_id <=", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdLike(String value) {
addCriterion("status_id like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotLike(String value) {
addCriterion("status_id not like", value, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdIn(List<String> values) {
addCriterion("status_id in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotIn(List<String> values) {
addCriterion("status_id not in", values, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdBetween(String value1, String value2) {
addCriterion("status_id between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andStatusIdNotBetween(String value1, String value2) {
addCriterion("status_id not between", value1, value2, "statusId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andSiteLogoIsNull() {
addCriterion("site_logo is null");
return (Criteria) this;
}
public Criteria andSiteLogoIsNotNull() {
addCriterion("site_logo is not null");
return (Criteria) this;
}
public Criteria andSiteLogoEqualTo(String value) {
addCriterion("site_logo =", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoNotEqualTo(String value) {
addCriterion("site_logo <>", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoGreaterThan(String value) {
addCriterion("site_logo >", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoGreaterThanOrEqualTo(String value) {
addCriterion("site_logo >=", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoLessThan(String value) {
addCriterion("site_logo <", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoLessThanOrEqualTo(String value) {
addCriterion("site_logo <=", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoLike(String value) {
addCriterion("site_logo like", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoNotLike(String value) {
addCriterion("site_logo not like", value, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoIn(List<String> values) {
addCriterion("site_logo in", values, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoNotIn(List<String> values) {
addCriterion("site_logo not in", values, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoBetween(String value1, String value2) {
addCriterion("site_logo between", value1, value2, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteLogoNotBetween(String value1, String value2) {
addCriterion("site_logo not between", value1, value2, "siteLogo");
return (Criteria) this;
}
public Criteria andSiteNameIsNull() {
addCriterion("site_name is null");
return (Criteria) this;
}
public Criteria andSiteNameIsNotNull() {
addCriterion("site_name is not null");
return (Criteria) this;
}
public Criteria andSiteNameEqualTo(String value) {
addCriterion("site_name =", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotEqualTo(String value) {
addCriterion("site_name <>", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameGreaterThan(String value) {
addCriterion("site_name >", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameGreaterThanOrEqualTo(String value) {
addCriterion("site_name >=", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameLessThan(String value) {
addCriterion("site_name <", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameLessThanOrEqualTo(String value) {
addCriterion("site_name <=", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameLike(String value) {
addCriterion("site_name like", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotLike(String value) {
addCriterion("site_name not like", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameIn(List<String> values) {
addCriterion("site_name in", values, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotIn(List<String> values) {
addCriterion("site_name not in", values, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameBetween(String value1, String value2) {
addCriterion("site_name between", value1, value2, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotBetween(String value1, String value2) {
addCriterion("site_name not between", value1, value2, "siteName");
return (Criteria) this;
}
public Criteria andSiteDescIsNull() {
addCriterion("site_desc is null");
return (Criteria) this;
}
public Criteria andSiteDescIsNotNull() {
addCriterion("site_desc is not null");
return (Criteria) this;
}
public Criteria andSiteDescEqualTo(String value) {
addCriterion("site_desc =", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescNotEqualTo(String value) {
addCriterion("site_desc <>", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescGreaterThan(String value) {
addCriterion("site_desc >", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescGreaterThanOrEqualTo(String value) {
addCriterion("site_desc >=", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescLessThan(String value) {
addCriterion("site_desc <", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescLessThanOrEqualTo(String value) {
addCriterion("site_desc <=", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescLike(String value) {
addCriterion("site_desc like", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescNotLike(String value) {
addCriterion("site_desc not like", value, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescIn(List<String> values) {
addCriterion("site_desc in", values, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescNotIn(List<String> values) {
addCriterion("site_desc not in", values, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescBetween(String value1, String value2) {
addCriterion("site_desc between", value1, value2, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteDescNotBetween(String value1, String value2) {
addCriterion("site_desc not between", value1, value2, "siteDesc");
return (Criteria) this;
}
public Criteria andSiteUrlIsNull() {
addCriterion("site_url is null");
return (Criteria) this;
}
public Criteria andSiteUrlIsNotNull() {
addCriterion("site_url is not null");
return (Criteria) this;
}
public Criteria andSiteUrlEqualTo(String value) {
addCriterion("site_url =", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlNotEqualTo(String value) {
addCriterion("site_url <>", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlGreaterThan(String value) {
addCriterion("site_url >", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlGreaterThanOrEqualTo(String value) {
addCriterion("site_url >=", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlLessThan(String value) {
addCriterion("site_url <", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlLessThanOrEqualTo(String value) {
addCriterion("site_url <=", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlLike(String value) {
addCriterion("site_url like", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlNotLike(String value) {
addCriterion("site_url not like", value, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlIn(List<String> values) {
addCriterion("site_url in", values, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlNotIn(List<String> values) {
addCriterion("site_url not in", values, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlBetween(String value1, String value2) {
addCriterion("site_url between", value1, value2, "siteUrl");
return (Criteria) this;
}
public Criteria andSiteUrlNotBetween(String value1, String value2) {
addCriterion("site_url not between", value1, value2, "siteUrl");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRole.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/entity/SysRole.java | package com.roncoo.jui.common.entity;
import java.io.Serializable;
import java.util.Date;
public class SysRole implements Serializable {
private Long id;
private Date gmtCreate;
private Date gmtModified;
private String statusId;
private Integer sort;
private String roleName;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getStatusId() {
return statusId;
}
public void setStatusId(String statusId) {
this.statusId = statusId == null ? null : statusId.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName == null ? null : roleName.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", statusId=").append(statusId);
sb.append(", sort=").append(sort);
sb.append(", roleName=").append(roleName);
sb.append(", remark=").append(remark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysMenuRoleMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysMenuRoleMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.SysMenuRole;
import com.roncoo.jui.common.entity.SysMenuRoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysMenuRoleMapper {
int countByExample(SysMenuRoleExample example);
int deleteByExample(SysMenuRoleExample example);
int deleteByPrimaryKey(Long id);
int insert(SysMenuRole record);
int insertSelective(SysMenuRole record);
List<SysMenuRole> selectByExample(SysMenuRoleExample example);
SysMenuRole selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysMenuRole record, @Param("example") SysMenuRoleExample example);
int updateByExample(@Param("record") SysMenuRole record, @Param("example") SysMenuRoleExample example);
int updateByPrimaryKeySelective(SysMenuRole record);
int updateByPrimaryKey(SysMenuRole record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysRoleUserMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysRoleUserMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.SysRoleUser;
import com.roncoo.jui.common.entity.SysRoleUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysRoleUserMapper {
int countByExample(SysRoleUserExample example);
int deleteByExample(SysRoleUserExample example);
int deleteByPrimaryKey(Long id);
int insert(SysRoleUser record);
int insertSelective(SysRoleUser record);
List<SysRoleUser> selectByExample(SysRoleUserExample example);
SysRoleUser selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysRoleUser record, @Param("example") SysRoleUserExample example);
int updateByExample(@Param("record") SysRoleUser record, @Param("example") SysRoleUserExample example);
int updateByPrimaryKeySelective(SysRoleUser record);
int updateByPrimaryKey(SysRoleUser record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/WebSiteMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/WebSiteMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.WebSite;
import com.roncoo.jui.common.entity.WebSiteExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface WebSiteMapper {
int countByExample(WebSiteExample example);
int deleteByExample(WebSiteExample example);
int deleteByPrimaryKey(Long id);
int insert(WebSite record);
int insertSelective(WebSite record);
List<WebSite> selectByExample(WebSiteExample example);
WebSite selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") WebSite record, @Param("example") WebSiteExample example);
int updateByExample(@Param("record") WebSite record, @Param("example") WebSiteExample example);
int updateByPrimaryKeySelective(WebSite record);
int updateByPrimaryKey(WebSite record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/RcDataDictionaryMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/RcDataDictionaryMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.RcDataDictionary;
import com.roncoo.jui.common.entity.RcDataDictionaryExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface RcDataDictionaryMapper {
int countByExample(RcDataDictionaryExample example);
int deleteByExample(RcDataDictionaryExample example);
int deleteByPrimaryKey(Long id);
int insert(RcDataDictionary record);
int insertSelective(RcDataDictionary record);
List<RcDataDictionary> selectByExample(RcDataDictionaryExample example);
RcDataDictionary selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") RcDataDictionary record, @Param("example") RcDataDictionaryExample example);
int updateByExample(@Param("record") RcDataDictionary record, @Param("example") RcDataDictionaryExample example);
int updateByPrimaryKeySelective(RcDataDictionary record);
int updateByPrimaryKey(RcDataDictionary record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/RcReportMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/RcReportMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.RcReport;
import com.roncoo.jui.common.entity.RcReportExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface RcReportMapper {
int countByExample(RcReportExample example);
int deleteByExample(RcReportExample example);
int deleteByPrimaryKey(Long id);
int insert(RcReport record);
int insertSelective(RcReport record);
List<RcReport> selectByExample(RcReportExample example);
RcReport selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") RcReport record, @Param("example") RcReportExample example);
int updateByExample(@Param("record") RcReport record, @Param("example") RcReportExample example);
int updateByPrimaryKeySelective(RcReport record);
int updateByPrimaryKey(RcReport record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysUserMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysUserMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.SysUser;
import com.roncoo.jui.common.entity.SysUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysUserMapper {
int countByExample(SysUserExample example);
int deleteByExample(SysUserExample example);
int deleteByPrimaryKey(Long id);
int insert(SysUser record);
int insertSelective(SysUser record);
List<SysUser> selectByExample(SysUserExample example);
SysUser selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example);
int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example);
int updateByPrimaryKeySelective(SysUser record);
int updateByPrimaryKey(SysUser record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysMenuMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysMenuMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.SysMenu;
import com.roncoo.jui.common.entity.SysMenuExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysMenuMapper {
int countByExample(SysMenuExample example);
int deleteByExample(SysMenuExample example);
int deleteByPrimaryKey(Long id);
int insert(SysMenu record);
int insertSelective(SysMenu record);
List<SysMenu> selectByExample(SysMenuExample example);
SysMenu selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysMenu record, @Param("example") SysMenuExample example);
int updateByExample(@Param("record") SysMenu record, @Param("example") SysMenuExample example);
int updateByPrimaryKeySelective(SysMenu record);
int updateByPrimaryKey(SysMenu record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/WebSiteUrlMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/WebSiteUrlMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.WebSiteUrl;
import com.roncoo.jui.common.entity.WebSiteUrlExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface WebSiteUrlMapper {
int countByExample(WebSiteUrlExample example);
int deleteByExample(WebSiteUrlExample example);
int deleteByPrimaryKey(Long id);
int insert(WebSiteUrl record);
int insertSelective(WebSiteUrl record);
List<WebSiteUrl> selectByExample(WebSiteUrlExample example);
WebSiteUrl selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") WebSiteUrl record, @Param("example") WebSiteUrlExample example);
int updateByExample(@Param("record") WebSiteUrl record, @Param("example") WebSiteUrlExample example);
int updateByPrimaryKeySelective(WebSiteUrl record);
int updateByPrimaryKey(WebSiteUrl record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysRoleMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/SysRoleMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.SysRole;
import com.roncoo.jui.common.entity.SysRoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysRoleMapper {
int countByExample(SysRoleExample example);
int deleteByExample(SysRoleExample example);
int deleteByPrimaryKey(Long id);
int insert(SysRole record);
int insertSelective(SysRole record);
List<SysRole> selectByExample(SysRoleExample example);
SysRole selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysRole record, @Param("example") SysRoleExample example);
int updateByExample(@Param("record") SysRole record, @Param("example") SysRoleExample example);
int updateByPrimaryKeySelective(SysRole record);
int updateByPrimaryKey(SysRole record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/RcDataDictionaryListMapper.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/mapper/RcDataDictionaryListMapper.java | package com.roncoo.jui.common.mapper;
import com.roncoo.jui.common.entity.RcDataDictionaryList;
import com.roncoo.jui.common.entity.RcDataDictionaryListExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface RcDataDictionaryListMapper {
int countByExample(RcDataDictionaryListExample example);
int deleteByExample(RcDataDictionaryListExample example);
int deleteByPrimaryKey(Long id);
int insert(RcDataDictionaryList record);
int insertSelective(RcDataDictionaryList record);
List<RcDataDictionaryList> selectByExample(RcDataDictionaryListExample example);
RcDataDictionaryList selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") RcDataDictionaryList record, @Param("example") RcDataDictionaryListExample example);
int updateByExample(@Param("record") RcDataDictionaryList record, @Param("example") RcDataDictionaryListExample example);
int updateByPrimaryKeySelective(RcDataDictionaryList record);
int updateByPrimaryKey(RcDataDictionaryList record);
} | java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/ResultEnum.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/ResultEnum.java | package com.roncoo.jui.common.enums;
import lombok.Getter;
@Getter
public enum ResultEnum {
SUCCESS(200, "成功"), ERROR(99, "失败");
private Integer code;
private String desc;
private ResultEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/StatusIdEnum.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/StatusIdEnum.java | package com.roncoo.jui.common.enums;
import lombok.Getter;
@Getter
public enum StatusIdEnum {
YES("1", "可用"), NO("0", "禁用");
private String code;
private String desc;
private StatusIdEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/UserStatusEnum.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/UserStatusEnum.java | package com.roncoo.jui.common.enums;
import lombok.Getter;
/**
* 用户状态
*/
@Getter
public enum UserStatusEnum {
NORMAL("1", "正常"), CANCEL("2", "注销");
private String code;
private String desc;
private UserStatusEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
roncoo/roncoo-jui-springboot | https://github.com/roncoo/roncoo-jui-springboot/blob/bfa5120e427c3a055d20180917acfce528d3d68c/roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/UserSexEnum.java | roncoo-jui-springboot-common/src/main/java/com/roncoo/jui/common/enums/UserSexEnum.java | package com.roncoo.jui.common.enums;
import lombok.Getter;
/**
* 用户性别
*/
@Getter
public enum UserSexEnum {
MEN("1", "男"), WOMEN("2", "女");
private String code;
private String desc;
private UserSexEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
}
| java | Apache-2.0 | bfa5120e427c3a055d20180917acfce528d3d68c | 2026-01-05T02:40:56.023655Z | false |
justinsb/jetcd | https://github.com/justinsb/jetcd/blob/1e73f1deb7d090748515eb8ab07caa4cc706834e/src/test/java/com/justinsb/etcd/SmokeTest.java | src/test/java/com/justinsb/etcd/SmokeTest.java | package com.justinsb.etcd;
import java.net.URI;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.google.common.util.concurrent.ListenableFuture;
import com.justinsb.etcd.EtcdClient;
import com.justinsb.etcd.EtcdClientException;
import com.justinsb.etcd.EtcdResult;
public class SmokeTest {
String prefix;
EtcdClient client;
@Before
public void initialize() {
this.prefix = "/unittest-" + UUID.randomUUID().toString();
this.client = new EtcdClient(URI.create("http://127.0.0.1:4001/"));
}
@Test
public void setAndGet() throws Exception {
String key = prefix + "/message";
EtcdResult result;
result = this.client.set(key, "hello");
Assert.assertEquals("set", result.action);
Assert.assertEquals("hello", result.node.value);
Assert.assertNull(result.prevNode);
result = this.client.get(key);
Assert.assertEquals("get", result.action);
Assert.assertEquals("hello", result.node.value);
Assert.assertNull(result.prevNode);
result = this.client.set(key, "world");
Assert.assertEquals("set", result.action);
Assert.assertEquals("world", result.node.value);
Assert.assertNotNull(result.prevNode);
Assert.assertEquals("hello", result.prevNode.value);
result = this.client.get(key);
Assert.assertEquals("get", result.action);
Assert.assertEquals("world", result.node.value);
Assert.assertNull(result.prevNode);
}
@Test
public void getNonExistentKey() throws Exception {
String key = prefix + "/doesnotexist";
EtcdResult result;
result = this.client.get(key);
Assert.assertNull(result);
}
@Test
public void testDelete() throws Exception {
String key = prefix + "/testDelete";
EtcdResult result;
result = this.client.set(key, "hello");
result = this.client.get(key);
Assert.assertEquals("hello", result.node.value);
result = this.client.delete(key);
Assert.assertEquals("delete", result.action);
Assert.assertEquals(null, result.node.value);
Assert.assertNotNull(result.prevNode);
Assert.assertEquals("hello", result.prevNode.value);
result = this.client.get(key);
Assert.assertNull(result);
}
@Test
public void deleteNonExistentKey() throws Exception {
String key = prefix + "/doesnotexist";
try {
/*EtcdResult result =*/ this.client.delete(key);
Assert.fail();
} catch (EtcdClientException e) {
Assert.assertTrue(e.isEtcdError(100));
}
}
@Test
public void testTtl() throws Exception {
String key = prefix + "/ttl";
EtcdResult result;
result = this.client.set(key, "hello", 2);
Assert.assertNotNull(result.node.expiration);
Assert.assertTrue(result.node.ttl == 2 || result.node.ttl == 1);
result = this.client.get(key);
Assert.assertEquals("hello", result.node.value);
// TTL was redefined to mean TTL + 0.5s (Issue #306)
Thread.sleep(3000);
result = this.client.get(key);
Assert.assertNull(result);
}
@Test
public void testCAS() throws Exception {
String key = prefix + "/cas";
EtcdResult result;
result = this.client.set(key, "hello");
result = this.client.get(key);
Assert.assertEquals("hello", result.node.value);
result = this.client.cas(key, "world", "world");
Assert.assertEquals(true, result.isError());
result = this.client.get(key);
Assert.assertEquals("hello", result.node.value);
result = this.client.cas(key, "hello", "world");
Assert.assertEquals(false, result.isError());
result = this.client.get(key);
Assert.assertEquals("world", result.node.value);
}
@Test
public void testWatchPrefix() throws Exception {
String key = prefix + "/watch";
EtcdResult result = this.client.set(key + "/f2", "f2");
Assert.assertTrue(!result.isError());
Assert.assertNotNull(result.node);
Assert.assertEquals("f2", result.node.value);
ListenableFuture<EtcdResult> watchFuture = this.client.watch(key,
result.node.modifiedIndex + 1,
true);
try {
EtcdResult watchResult = watchFuture
.get(100, TimeUnit.MILLISECONDS);
Assert.fail("Subtree watch fired unexpectedly: " + watchResult);
} catch (TimeoutException e) {
// Expected
}
Assert.assertFalse(watchFuture.isDone());
result = this.client.set(key + "/f1", "f1");
Assert.assertTrue(!result.isError());
Assert.assertNotNull(result.node);
Assert.assertEquals("f1", result.node.value);
EtcdResult watchResult = watchFuture.get(100, TimeUnit.MILLISECONDS);
Assert.assertNotNull(watchResult);
Assert.assertTrue(!watchResult.isError());
Assert.assertNotNull(watchResult.node);
{
Assert.assertEquals(key + "/f1", watchResult.node.key);
Assert.assertEquals("f1", watchResult.node.value);
Assert.assertEquals("set", watchResult.action);
Assert.assertNull(result.prevNode);
Assert.assertEquals(result.node.modifiedIndex,
watchResult.node.modifiedIndex);
}
}
@Test
public void testList() throws Exception {
String key = prefix + "/dir";
EtcdResult result;
result = this.client.set(key + "/f1", "f1");
Assert.assertEquals("f1", result.node.value);
result = this.client.set(key + "/f2", "f2");
Assert.assertEquals("f2", result.node.value);
result = this.client.set(key + "/f3", "f3");
Assert.assertEquals("f3", result.node.value);
result = this.client.set(key + "/subdir1/f", "f");
Assert.assertEquals("f", result.node.value);
EtcdResult listing = this.client.listChildren(key);
Assert.assertEquals(4, listing.node.nodes.size());
Assert.assertEquals("get", listing.action);
{
EtcdNode child = listing.node.nodes.get(0);
Assert.assertEquals(key + "/f1", child.key);
Assert.assertEquals("f1", child.value);
Assert.assertEquals(false, child.dir);
}
{
EtcdNode child = listing.node.nodes.get(1);
Assert.assertEquals(key + "/f2", child.key);
Assert.assertEquals("f2", child.value);
Assert.assertEquals(false, child.dir);
}
{
EtcdNode child = listing.node.nodes.get(2);
Assert.assertEquals(key + "/f3", child.key);
Assert.assertEquals("f3", child.value);
Assert.assertEquals(false, child.dir);
}
{
EtcdNode child = listing.node.nodes.get(3);
Assert.assertEquals(key + "/subdir1", child.key);
Assert.assertEquals(null, child.value);
Assert.assertEquals(true, child.dir);
}
}
@Test
public void testGetVersion() throws Exception {
String version = this.client.getVersion();
Assert.assertTrue(version.startsWith("etcd 0."));
}
}
| java | Apache-2.0 | 1e73f1deb7d090748515eb8ab07caa4cc706834e | 2026-01-05T02:41:00.047549Z | false |
justinsb/jetcd | https://github.com/justinsb/jetcd/blob/1e73f1deb7d090748515eb8ab07caa4cc706834e/src/main/java/com/justinsb/etcd/EtcdClient.java | src/main/java/com/justinsb/etcd/EtcdClient.java | package com.justinsb.etcd;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.concurrent.FutureCallback;
import org.apache.http.impl.nio.client.CloseableHttpAsyncClient;
import org.apache.http.impl.nio.client.HttpAsyncClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import com.google.common.base.Charsets;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.AsyncFunction;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonParseException;
import com.google.gson.JsonParser;
public class EtcdClient {
static final CloseableHttpAsyncClient httpClient = buildDefaultHttpClient();
static final Gson gson = new GsonBuilder().create();
static CloseableHttpAsyncClient buildDefaultHttpClient() {
// TODO: Increase timeout??
RequestConfig requestConfig = RequestConfig.custom().build();
CloseableHttpAsyncClient httpClient = HttpAsyncClients.custom().setDefaultRequestConfig(requestConfig).build();
httpClient.start();
return httpClient;
}
final URI baseUri;
public EtcdClient(URI baseUri) {
String uri = baseUri.toString();
if (!uri.endsWith("/")) {
uri += "/";
baseUri = URI.create(uri);
}
this.baseUri = baseUri;
}
/**
* Retrieves a key. Returns null if not found.
*/
public EtcdResult get(String key) throws EtcdClientException {
URI uri = buildKeyUri("v2/keys", key, "");
HttpGet request = new HttpGet(uri);
EtcdResult result = syncExecute(request, new int[] { 200, 404 }, 100);
if (result.isError()) {
if (result.errorCode == 100) {
return null;
}
}
return result;
}
/**
* Deletes the given key
*/
public EtcdResult delete(String key) throws EtcdClientException {
URI uri = buildKeyUri("v2/keys", key, "");
HttpDelete request = new HttpDelete(uri);
return syncExecute(request, new int[] { 200, 404 });
}
/**
* Sets a key to a new value
*/
public EtcdResult set(String key, String value) throws EtcdClientException {
return set(key, value, null);
}
/**
* Sets a key to a new value with an (optional) ttl
*/
public EtcdResult set(String key, String value, Integer ttl) throws EtcdClientException {
List<BasicNameValuePair> data = Lists.newArrayList();
data.add(new BasicNameValuePair("value", value));
if (ttl != null) {
data.add(new BasicNameValuePair("ttl", Integer.toString(ttl)));
}
return set0(key, data, new int[] { 200, 201 });
}
/**
* Creates a directory
*/
public EtcdResult createDirectory(String key) throws EtcdClientException {
List<BasicNameValuePair> data = Lists.newArrayList();
data.add(new BasicNameValuePair("dir", "true"));
return set0(key, data, new int[] { 200, 201 });
}
/**
* Lists a directory
*/
public List<EtcdNode> listDirectory(String key) throws EtcdClientException {
EtcdResult result = get(key + "/");
if (result == null || result.node == null) {
return null;
}
return result.node.nodes;
}
/**
* Delete a directory
*/
public EtcdResult deleteDirectory(String key) throws EtcdClientException {
URI uri = buildKeyUri("v2/keys", key, "?dir=true");
HttpDelete request = new HttpDelete(uri);
return syncExecute(request, new int[] { 202 });
}
/**
* Sets a key to a new value, if the value is a specified value
*/
public EtcdResult cas(String key, String prevValue, String value) throws EtcdClientException {
List<BasicNameValuePair> data = Lists.newArrayList();
data.add(new BasicNameValuePair("value", value));
data.add(new BasicNameValuePair("prevValue", prevValue));
return set0(key, data, new int[] { 200, 412 }, 101);
}
/**
* Watches the given subtree
*/
public ListenableFuture<EtcdResult> watch(String key) throws EtcdClientException {
return watch(key, null, false);
}
/**
* Watches the given subtree
*/
public ListenableFuture<EtcdResult> watch(String key, Long index, boolean recursive) throws EtcdClientException {
String suffix = "?wait=true";
if (index != null) {
suffix += "&waitIndex=" + index;
}
if (recursive) {
suffix += "&recursive=true";
}
URI uri = buildKeyUri("v2/keys", key, suffix);
HttpGet request = new HttpGet(uri);
return asyncExecute(request, new int[] { 200 });
}
/**
* Gets the etcd version
*/
public String getVersion() throws EtcdClientException {
URI uri = baseUri.resolve("version");
HttpGet request = new HttpGet(uri);
// Technically not JSON, but it'll work
// This call is the odd one out
JsonResponse s = syncExecuteJson(request, 200);
if (s.httpStatusCode != 200) {
throw new EtcdClientException("Error while fetching versions", s.httpStatusCode);
}
return s.json;
}
private EtcdResult set0(String key, List<BasicNameValuePair> data, int[] httpErrorCodes, int... expectedErrorCodes)
throws EtcdClientException {
URI uri = buildKeyUri("v2/keys", key, "");
HttpPut request = new HttpPut(uri);
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(data, Charsets.UTF_8);
request.setEntity(entity);
return syncExecute(request, httpErrorCodes, expectedErrorCodes);
}
public EtcdResult listChildren(String key) throws EtcdClientException {
URI uri = buildKeyUri("v2/keys", key, "/");
HttpGet request = new HttpGet(uri);
EtcdResult result = syncExecute(request, new int[] { 200 });
return result;
}
protected ListenableFuture<EtcdResult> asyncExecute(HttpUriRequest request, int[] expectedHttpStatusCodes, final int... expectedErrorCodes)
throws EtcdClientException {
ListenableFuture<JsonResponse> json = asyncExecuteJson(request, expectedHttpStatusCodes);
return Futures.transform(json, new AsyncFunction<JsonResponse, EtcdResult>() {
public ListenableFuture<EtcdResult> apply(JsonResponse json) throws Exception {
EtcdResult result = jsonToEtcdResult(json, expectedErrorCodes);
return Futures.immediateFuture(result);
}
});
}
protected EtcdResult syncExecute(HttpUriRequest request, int[] expectedHttpStatusCodes, int... expectedErrorCodes) throws EtcdClientException {
try {
return asyncExecute(request, expectedHttpStatusCodes, expectedErrorCodes).get();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new EtcdClientException("Interrupted during request", e);
} catch (ExecutionException e) {
throw unwrap(e);
}
// String json = syncExecuteJson(request);
// return jsonToEtcdResult(json, expectedErrorCodes);
}
private EtcdClientException unwrap(ExecutionException e) {
Throwable cause = e.getCause();
if (cause instanceof EtcdClientException) {
return (EtcdClientException) cause;
}
return new EtcdClientException("Error executing request", e);
}
private EtcdResult jsonToEtcdResult(JsonResponse response, int... expectedErrorCodes) throws EtcdClientException {
if (response == null || response.json == null) {
return null;
}
EtcdResult result = parseEtcdResult(response.json);
if (result.isError()) {
if (!contains(expectedErrorCodes, result.errorCode)) {
throw new EtcdClientException(result.message, result);
}
}
return result;
}
private EtcdResult parseEtcdResult(String json) throws EtcdClientException {
EtcdResult result;
try {
result = gson.fromJson(json, EtcdResult.class);
} catch (JsonParseException e) {
throw new EtcdClientException("Error parsing response from etcd", e);
}
return result;
}
private static boolean contains(int[] list, int find) {
for (int i = 0; i < list.length; i++) {
if (list[i] == find) {
return true;
}
}
return false;
}
protected List<EtcdResult> syncExecuteList(HttpUriRequest request) throws EtcdClientException {
JsonResponse response = syncExecuteJson(request, 200);
if (response.json == null) {
return null;
}
if (response.httpStatusCode != 200) {
EtcdResult etcdResult = parseEtcdResult(response.json);
throw new EtcdClientException("Error listing keys", etcdResult);
}
try {
List<EtcdResult> ret = new ArrayList<EtcdResult>();
JsonParser parser = new JsonParser();
JsonArray array = parser.parse(response.json).getAsJsonArray();
for (int i = 0; i < array.size(); i++) {
EtcdResult next = gson.fromJson(array.get(i), EtcdResult.class);
ret.add(next);
}
return ret;
} catch (JsonParseException e) {
throw new EtcdClientException("Error parsing response from etcd", e);
}
}
protected JsonResponse syncExecuteJson(HttpUriRequest request, int... expectedHttpStatusCodes) throws EtcdClientException {
try {
return asyncExecuteJson(request, expectedHttpStatusCodes).get();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new EtcdClientException("Interrupted during request processing", e);
} catch (ExecutionException e) {
throw unwrap(e);
}
// ListenableFuture<HttpResponse> response = asyncExecuteHttp(request);
//
// HttpResponse httpResponse;
// try {
// httpResponse = response.get();
// } catch (InterruptedException e) {
// Thread.currentThread().interrupt();
// throw new
// EtcdClientException("Interrupted during request processing", e);
// } catch (ExecutionException e) {
// // TODO: Unwrap?
// throw new EtcdClientException("Error executing request", e);
// }
//
// String json = parseJsonResponse(httpResponse);
// return json;
}
protected ListenableFuture<JsonResponse> asyncExecuteJson(HttpUriRequest request, final int[] expectedHttpStatusCodes) throws EtcdClientException {
ListenableFuture<HttpResponse> response = asyncExecuteHttp(request);
return Futures.transform(response, new AsyncFunction<HttpResponse, JsonResponse>() {
public ListenableFuture<JsonResponse> apply(HttpResponse httpResponse) throws Exception {
JsonResponse json = extractJsonResponse(httpResponse, expectedHttpStatusCodes);
return Futures.immediateFuture(json);
}
});
}
/**
* We need the status code & the response to parse an error response.
*/
static class JsonResponse {
final String json;
final int httpStatusCode;
public JsonResponse(String json, int statusCode) {
this.json = json;
this.httpStatusCode = statusCode;
}
}
protected JsonResponse extractJsonResponse(HttpResponse httpResponse, int[] expectedHttpStatusCodes) throws EtcdClientException {
try {
StatusLine statusLine = httpResponse.getStatusLine();
int statusCode = statusLine.getStatusCode();
String json = null;
if (httpResponse.getEntity() != null) {
try {
json = EntityUtils.toString(httpResponse.getEntity());
} catch (IOException e) {
throw new EtcdClientException("Error reading response", e);
}
}
if (!contains(expectedHttpStatusCodes, statusCode)) {
if (statusCode == 400 && json != null) {
// More information in JSON
} else {
throw new EtcdClientException("Error response from etcd: " + statusLine.getReasonPhrase(),
statusCode);
}
}
return new JsonResponse(json, statusCode);
} finally {
close(httpResponse);
}
}
private URI buildKeyUri(String prefix, String key, String suffix) {
StringBuilder sb = new StringBuilder();
sb.append(prefix);
if (key.startsWith("/")) {
key = key.substring(1);
}
for (String token : Splitter.on('/').split(key)) {
sb.append("/");
sb.append(urlEscape(token));
}
sb.append(suffix);
URI uri = baseUri.resolve(sb.toString());
return uri;
}
protected ListenableFuture<HttpResponse> asyncExecuteHttp(HttpUriRequest request) {
final SettableFuture<HttpResponse> future = SettableFuture.create();
httpClient.execute(request, new FutureCallback<HttpResponse>() {
public void completed(HttpResponse result) {
future.set(result);
}
public void failed(Exception ex) {
future.setException(ex);
}
public void cancelled() {
future.setException(new InterruptedException());
}
});
return future;
}
public static void close(HttpResponse response) {
if (response == null) {
return;
}
HttpEntity entity = response.getEntity();
if (entity != null) {
EntityUtils.consumeQuietly(entity);
}
}
protected static String urlEscape(String s) {
try {
return URLEncoder.encode(s, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new IllegalStateException();
}
}
public static String format(Object o) {
try {
return gson.toJson(o);
} catch (Exception e) {
return "Error formatting: " + e.getMessage();
}
}
}
| java | Apache-2.0 | 1e73f1deb7d090748515eb8ab07caa4cc706834e | 2026-01-05T02:41:00.047549Z | false |
justinsb/jetcd | https://github.com/justinsb/jetcd/blob/1e73f1deb7d090748515eb8ab07caa4cc706834e/src/main/java/com/justinsb/etcd/EtcdResult.java | src/main/java/com/justinsb/etcd/EtcdResult.java | package com.justinsb.etcd;
public class EtcdResult {
// General values
public String action;
public EtcdNode node;
public EtcdNode prevNode;
// For errors
public Integer errorCode;
public String message;
public String cause;
public int errorIndex;
public boolean isError() {
return errorCode != null;
}
@Override
public String toString() {
return EtcdClient.format(this);
}
}
| java | Apache-2.0 | 1e73f1deb7d090748515eb8ab07caa4cc706834e | 2026-01-05T02:41:00.047549Z | false |
justinsb/jetcd | https://github.com/justinsb/jetcd/blob/1e73f1deb7d090748515eb8ab07caa4cc706834e/src/main/java/com/justinsb/etcd/EtcdClientException.java | src/main/java/com/justinsb/etcd/EtcdClientException.java | package com.justinsb.etcd;
import java.io.IOException;
public class EtcdClientException extends IOException {
private static final long serialVersionUID = 1L;
final Integer httpStatusCode;
final EtcdResult result;
public EtcdClientException(String message, Throwable cause) {
super(message, cause);
this.httpStatusCode = null;
this.result = null;
}
public EtcdClientException(String message, int httpStatusCode) {
super(message + "(" + httpStatusCode + ")");
this.httpStatusCode = httpStatusCode;
this.result = null;
}
public EtcdClientException(String message, EtcdResult result) {
super(message);
this.httpStatusCode = null;
this.result = result;
}
public int getHttpStatusCode() {
return httpStatusCode;
}
public boolean isHttpError(int httpStatusCode) {
return (this.httpStatusCode != null && httpStatusCode == this.httpStatusCode);
}
public boolean isEtcdError(int etcdCode) {
return (this.result != null && this.result.errorCode != null && etcdCode == this.result.errorCode);
}
}
| java | Apache-2.0 | 1e73f1deb7d090748515eb8ab07caa4cc706834e | 2026-01-05T02:41:00.047549Z | false |
justinsb/jetcd | https://github.com/justinsb/jetcd/blob/1e73f1deb7d090748515eb8ab07caa4cc706834e/src/main/java/com/justinsb/etcd/EtcdNode.java | src/main/java/com/justinsb/etcd/EtcdNode.java | package com.justinsb.etcd;
import java.util.List;
public class EtcdNode {
public String key;
public long createdIndex;
public long modifiedIndex;
public String value;
// For TTL keys
public String expiration;
public Integer ttl;
// For listings
public boolean dir;
public List<EtcdNode> nodes;
@Override
public String toString() {
return EtcdClient.format(this);
}
}
| java | Apache-2.0 | 1e73f1deb7d090748515eb8ab07caa4cc706834e | 2026-01-05T02:41:00.047549Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/test/java/com/zhuinden/flowless_viewpager_example/ExampleUnitTest.java | flowless-viewpager-example/src/test/java/com/zhuinden/flowless_viewpager_example/ExampleUnitTest.java | package com.zhuinden.flowless_viewpager_example;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect()
throws Exception {
assertEquals(4, 2 + 2);
}
} | java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewOne.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewOne.java | package com.zhuinden.flowless_viewpager_example;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.RelativeLayout;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.07.17..
*/
public class PagerViewOne extends RelativeLayout implements FlowLifecycles.ViewLifecycleListener {
private static final String TAG = "PagerViewOne";
public PagerViewOne(Context context) {
super(context);
}
public PagerViewOne(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PagerViewOne(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public PagerViewOne(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onViewRestored() {
Log.i(TAG, "View restored in [" + TAG + "]");
}
@Override
public void onViewDestroyed(boolean removedByFlow) {
Log.i(TAG, "View destroyed in [" + TAG + "]");
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewFour.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewFour.java | package com.zhuinden.flowless_viewpager_example;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.RelativeLayout;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.07.17..
*/
public class PagerViewFour extends RelativeLayout implements FlowLifecycles.ViewLifecycleListener {
private static final String TAG = "PagerViewFour";
public PagerViewFour(Context context) {
super(context);
}
public PagerViewFour(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PagerViewFour(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public PagerViewFour(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onViewRestored() {
Log.i(TAG, "View restored in [" + TAG + "]");
}
@Override
public void onViewDestroyed(boolean removedByFlow) {
Log.i(TAG, "View destroyed in [" + TAG + "]");
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/MainActivity.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/MainActivity.java | package com.zhuinden.flowless_viewpager_example;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.view.ViewGroup;
import com.zhuinden.flowless_viewpager_example.extracted.ExampleDispatcher;
import butterknife.BindView;
import butterknife.ButterKnife;
import flowless.Flow;
import flowless.preset.SingleRootDispatcher;
public class MainActivity
extends AppCompatActivity {
@BindView(R.id.main_root)
ViewGroup root;
SingleRootDispatcher flowDispatcher;
@Override
protected void attachBaseContext(Context newBase) {
flowDispatcher = new ExampleDispatcher();
newBase = Flow.configure(newBase, this) //
.defaultKey(FirstKey.create()) //
.dispatcher(flowDispatcher) //
.install(); //
flowDispatcher.setBaseContext(this);
super.attachBaseContext(newBase);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
flowDispatcher.getRootHolder().setRoot(root);
}
@Override
public void onBackPressed() {
if(!flowDispatcher.onBackPressed()) {
super.onBackPressed();
}
}
@Override
protected void onSaveInstanceState(Bundle outState) {
flowDispatcher.preSaveViewState();
super.onSaveInstanceState(outState);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
flowDispatcher.onActivityResult(requestCode, resultCode, data);
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
flowDispatcher.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/FirstKey.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/FirstKey.java | package com.zhuinden.flowless_viewpager_example;
import com.google.auto.value.AutoValue;
import com.zhuinden.flowless_viewpager_example.extracted.FlowAnimation;
import com.zhuinden.flowless_viewpager_example.extracted.LayoutKey;
/**
* Created by Zhuinden on 2016.07.17..
*/
@AutoValue
public abstract class FirstKey
implements LayoutKey {
public static FirstKey create() {
return new AutoValue_FirstKey(R.layout.path_first, FlowAnimation.SEGUE);
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewTwo.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewTwo.java | package com.zhuinden.flowless_viewpager_example;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.RelativeLayout;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.07.17..
*/
public class PagerViewTwo extends RelativeLayout implements FlowLifecycles.ViewLifecycleListener {
private static final String TAG = "PagerViewTwo";
public PagerViewTwo(Context context) {
super(context);
}
public PagerViewTwo(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PagerViewTwo(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public PagerViewTwo(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onViewRestored() {
Log.i(TAG, "View restored in [" + TAG + "]");
}
@Override
public void onViewDestroyed(boolean removedByFlow) {
Log.i(TAG, "View destroyed in [" + TAG + "]");
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewFive.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewFive.java | package com.zhuinden.flowless_viewpager_example;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.RelativeLayout;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.07.17..
*/
public class PagerViewFive extends RelativeLayout implements FlowLifecycles.ViewLifecycleListener {
private static final String TAG = "PagerViewFive";
public PagerViewFive(Context context) {
super(context);
}
public PagerViewFive(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PagerViewFive(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public PagerViewFive(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onViewRestored() {
Log.i(TAG, "View restored in [" + TAG + "]");
}
@Override
public void onViewDestroyed(boolean removedByFlow) {
Log.i(TAG, "View destroyed in [" + TAG + "]");
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewThree.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/PagerViewThree.java | package com.zhuinden.flowless_viewpager_example;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.RelativeLayout;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.07.17..
*/
public class PagerViewThree extends RelativeLayout implements FlowLifecycles.ViewLifecycleListener {
private static final String TAG = "PagerViewThree";
public PagerViewThree(Context context) {
super(context);
}
public PagerViewThree(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PagerViewThree(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public PagerViewThree(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onViewRestored() {
Log.i(TAG, "View restored in [" + TAG + "]");
}
@Override
public void onViewDestroyed(boolean removedByFlow) {
Log.i(TAG, "View destroyed in [" + TAG + "]");
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/FlowlessPagerAdapter.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/FlowlessPagerAdapter.java | package com.zhuinden.flowless_viewpager_example;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import flowless.Bundleable;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.07.17..
*/
public abstract class FlowlessPagerAdapter
extends PagerAdapter {
final Bundle[] bundles = new Bundle[getCount()]; // TODO: change to list like FragmentStatePagerAdapter
final View[] views = new View[getCount()]; // TODO: change to list like FragmentStatePagerAdapter
final boolean[] didCallDestroy = new boolean[getCount()]; // TODO: fix hack for multiple saveState calls (possibly through delegation of event from view...? -_-)
@Override
public View instantiateItem(ViewGroup container, int position) {
View view = getItem(position);
if(bundles[position] != null) {
Bundle savedState = bundles[position];
view.restoreHierarchyState(savedState.getSparseParcelableArray("viewState"));
if(view instanceof Bundleable) {
((Bundleable) view).fromBundle(savedState.getBundle("bundle"));
}
}
if(view instanceof FlowLifecycles.ViewLifecycleListener) {
((FlowLifecycles.ViewLifecycleListener) view).onViewRestored();
}
container.addView(view);
views[position] = view;
return view;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
View view = (View)object;
if(bundles[position] == null) {
bundles[position] = new Bundle();
}
Bundle savedState = bundles[position];
saveStateForView(view, savedState);
if(view instanceof FlowLifecycles.ViewLifecycleListener) {
((FlowLifecycles.ViewLifecycleListener) view).onViewDestroyed(false);
}
views[position] = null;
container.removeView(view);
}
@Override
public Parcelable saveState() {
Bundle pagerState = new Bundle();
for(int i = 0; i < getCount(); i++) {
if(views[i] != null) {
if(bundles[i] == null) {
bundles[i] = new Bundle();
}
View view = views[i];
Bundle savedState = bundles[i];
saveStateForView(view, savedState);
if(view instanceof FlowLifecycles.ViewLifecycleListener) {
if(!didCallDestroy[i]) {
didCallDestroy[i] = true;
((FlowLifecycles.ViewLifecycleListener) view).onViewDestroyed(false);
}
}
}
if(bundles[i] != null) {
Bundle viewState = bundles[i];
pagerState.putBundle("viewState_" + i, viewState);
}
}
return pagerState;
}
private void saveStateForView(View view, Bundle savedState) {
if(view instanceof FlowLifecycles.PreSaveViewStateListener) {
((FlowLifecycles.PreSaveViewStateListener) view).preSaveViewState();
}
SparseArray<Parcelable> viewState = new SparseArray<>();
view.saveHierarchyState(viewState);
savedState.putSparseParcelableArray("viewState", viewState);
if(view instanceof Bundleable) {
savedState.putBundle("bundle", ((Bundleable) view).toBundle());
}
}
@Override
public void restoreState(Parcelable state, ClassLoader loader) {
Bundle pagerState = (Bundle)state;
pagerState.setClassLoader(loader); // added to fix BadParcelException on process death
for(int i = 0; i < getCount(); i++) {
Bundle viewState = pagerState.getBundle("viewState_" + i);
if(viewState != null) {
bundles[i] = viewState;
}
}
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
public abstract View getItem(int position);
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/FirstView.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/FirstView.java | package com.zhuinden.flowless_viewpager_example;
import android.annotation.TargetApi;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.07.17..
*/
public class FirstView extends LinearLayout implements FlowLifecycles.ViewLifecycleListener {
private static final String TAG = "FirstView";
public FirstView(Context context) {
super(context);
}
public FirstView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FirstView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public FirstView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@BindView(R.id.first_viewpager)
ViewPager viewPager;
@Override
protected void onFinishInflate() {
super.onFinishInflate();
ButterKnife.bind(this);
viewPager.setAdapter(new FlowlessPagerAdapter() {
@Override
public View getItem(int position) {
switch(position) {
case 0:
return LayoutInflater.from(getContext()).inflate(R.layout.pager_view_one, viewPager, false);
case 1:
return LayoutInflater.from(getContext()).inflate(R.layout.pager_view_two, viewPager, false);
case 2:
return LayoutInflater.from(getContext()).inflate(R.layout.pager_view_three, viewPager, false);
case 3:
return LayoutInflater.from(getContext()).inflate(R.layout.pager_view_four, viewPager, false);
case 4:
return LayoutInflater.from(getContext()).inflate(R.layout.pager_view_five, viewPager, false);
default:
Log.i(TAG, "Unknown view at position [" + position + "]");
throw new IllegalArgumentException("Unknown view at position [" + position + "]");
}
}
@Override
public int getCount() {
return 5;
}
});
}
@Override
public void onViewRestored() {
Log.i(TAG, "View restored in [" + TAG + "]");
}
@Override
public void onViewDestroyed(boolean removedByFlow) {
Log.i(TAG, "View destroyed in [" + TAG + "]");
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/DispatcherUtils.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/DispatcherUtils.java | package com.zhuinden.flowless_viewpager_example.extracted;
import android.animation.Animator;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import flowless.Direction;
import flowless.Traversal;
/**
* Created by Zhuinden on 2016.12.03..
*/
class DispatcherUtils {
public static void addViewToGroupForKey(Direction direction, View view, ViewGroup root, LayoutKey animatedKey) {
if(animatedKey.animation() != null && !animatedKey.animation().showChildOnTopWhenAdded(direction)) {
root.addView(view, 0);
} else {
root.addView(view);
}
}
public static Animator createAnimatorForViews(LayoutKey animatedKey, View previousView, View newView, Direction direction) {
if(previousView == null) {
return null;
}
if(animatedKey.animation() != null) {
return animatedKey.animation().createAnimation(previousView, newView, direction);
}
return null;
}
public static View createViewFromKey(Traversal traversal, LayoutKey newKey, ViewGroup root, Context baseContext) {
Context internalContext = DispatcherUtils.createContextForKey(traversal, newKey, baseContext);
LayoutInflater layoutInflater = LayoutInflater.from(internalContext);
final View newView = layoutInflater.inflate(newKey.layout(), root, false);
return newView;
}
public static Context createContextForKey(Traversal traversal, LayoutKey newKey, Context baseContext) {
return traversal.createContext(newKey, baseContext);
}
public static LayoutKey selectAnimatedKey(Direction direction, LayoutKey previousKey, LayoutKey newKey) {
return direction == Direction.BACKWARD ? (previousKey != null ? previousKey : newKey) : newKey;
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/LayoutKey.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/LayoutKey.java | package com.zhuinden.flowless_viewpager_example.extracted;
import android.os.Parcelable;
import android.support.annotation.LayoutRes;
/**
* Created by Zhuinden on 2016.06.27..
*/
public interface LayoutKey
extends Parcelable {
@LayoutRes int layout();
FlowAnimation animation();
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/ExampleDispatcher.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/ExampleDispatcher.java | package com.zhuinden.flowless_viewpager_example.extracted;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import flowless.Direction;
import flowless.Traversal;
import flowless.TraversalCallback;
import flowless.ViewUtils;
import flowless.preset.SingleRootDispatcher;
/**
* Created by Zhuinden on 2016.12.03..
*/
public class ExampleDispatcher extends SingleRootDispatcher {
@Override
public void dispatch(@NonNull Traversal traversal, final @NonNull TraversalCallback callback) {
final ViewGroup root = rootHolder.getRoot();
if(flowless.preset.DispatcherUtils.isPreviousKeySameAsNewKey(traversal.origin, traversal.destination)) { //short circuit on same key
callback.onTraversalCompleted();
onTraversalCompleted();
return;
}
final LayoutKey newKey = flowless.preset.DispatcherUtils.getNewKey(traversal);
final LayoutKey previousKey = flowless.preset.DispatcherUtils.getPreviousKey(traversal);
final Direction direction = traversal.direction;
final View previousView = root.getChildAt(0);
flowless.preset.DispatcherUtils.persistViewToStateAndNotifyRemoval(traversal, previousView);
final View newView = DispatcherUtils.createViewFromKey(traversal, newKey, root, baseContext);
flowless.preset.DispatcherUtils.restoreViewFromState(traversal, newView);
final LayoutKey animatedKey = DispatcherUtils.selectAnimatedKey(direction, previousKey, newKey);
DispatcherUtils.addViewToGroupForKey(direction, newView, root, animatedKey);
configure(previousKey, newKey);
ViewUtils.waitForMeasure(newView, new ViewUtils.OnMeasuredCallback() {
@Override
public void onMeasured(View view, int width, int height) {
Animator animator = DispatcherUtils.createAnimatorForViews(animatedKey, previousView, newView, direction);
if(animator != null) {
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
finishTransition(previousView, root, callback);
}
});
animator.start();
} else {
finishTransition(previousView, root, callback);
}
}
});
}
protected void configure(LayoutKey previousKey, LayoutKey newKey) {
}
private void finishTransition(View previousView, ViewGroup root, @NonNull TraversalCallback callback) {
if(previousView != null) {
root.removeView(previousView);
}
callback.onTraversalCompleted();
onTraversalCompleted();
}
protected void onTraversalCompleted() {
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/FlowAnimation.java | flowless-viewpager-example/src/main/java/com/zhuinden/flowless_viewpager_example/extracted/FlowAnimation.java | package com.zhuinden.flowless_viewpager_example.extracted;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import java.io.Serializable;
import flowless.Direction;
/**
* Created by Zhuinden on 2016.06.27..
*/
public abstract class FlowAnimation
implements Serializable {
public static FlowAnimation NONE = new FlowAnimation() {
@Nullable
@Override
public Animator createAnimation(@NonNull View previousView, @NonNull View newView, Direction direction) {
return null;
}
@Override
public boolean showChildOnTopWhenAdded(Direction direction) {
return true;
}
};
public static FlowAnimation SEGUE = new FlowAnimation() {
@Nullable
@Override
public Animator createAnimation(@NonNull View previousView, @NonNull View newView, Direction direction) {
if(direction == Direction.REPLACE) {
return null;
}
boolean backward = direction == Direction.BACKWARD;
int fromTranslation = backward ? previousView.getWidth() : -previousView.getWidth();
int toTranslation = backward ? -newView.getWidth() : newView.getWidth();
AnimatorSet set = new AnimatorSet();
set.play(ObjectAnimator.ofFloat(previousView, View.TRANSLATION_X, fromTranslation));
set.play(ObjectAnimator.ofFloat(newView, View.TRANSLATION_X, toTranslation, 0));
return set;
}
@Override
public boolean showChildOnTopWhenAdded(Direction direction) {
return true;
}
};
@Nullable
public abstract Animator createAnimation(@NonNull View previousView, @NonNull View newView, Direction direction);
public abstract boolean showChildOnTopWhenAdded(Direction direction);
@Override
public boolean equals(Object object) {
return object instanceof FlowAnimation || this == object;
}
@Override
public int hashCode() {
return FlowAnimation.class.getName().hashCode();
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/main/java/com/google/auto/value/AutoValue.java | flowless-viewpager-example/src/main/java/com/google/auto/value/AutoValue.java | package com.google.auto.value;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface AutoValue {
/**
* Specifies that AutoValue should generate an implementation of the annotated class or interface,
* to serve as a <i>builder</i> for the value-type class it is nested within. As a simple example,
* here is an alternative way to write the {@code Person} class mentioned in the {@link AutoValue}
* example: <pre>
*
* @AutoValue
* abstract class Person {
* static Builder builder() {
* return new AutoValue_Person.Builder();
* }
*
* abstract String name();
* abstract int id();
*
* @AutoValue.Builder
* interface Builder {
* Builder name(String x);
* Builder id(int x);
* Person build();
* }
* }</pre>
*
* @author Éamonn McManus
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface Builder {
}
} | java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-viewpager-example/src/androidTest/java/com/zhuinden/flowless_viewpager_example/ApplicationTest.java | flowless-viewpager-example/src/androidTest/java/com/zhuinden/flowless_viewpager_example/ApplicationTest.java | package com.zhuinden.flowless_viewpager_example;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest
extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/test/java/flowless/HistoryTest.java | flowless-library/src/test/java/flowless/HistoryTest.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Fail.fail;
@RunWith(RobolectricTestRunner.class) // Necessary for functional SparseArray
@Config(manifest = Config.NONE) //
public class HistoryTest {
private static final TestKey ABLE = new TestKey("able");
private static final TestKey BAKER = new TestKey("baker");
private static final TestKey CHARLIE = new TestKey("charlie");
@Test public void builderCanPushPeekAndPopObjects() {
History.Builder builder = History.emptyBuilder();
List<TestKey> objects = asList(ABLE, BAKER, CHARLIE);
for (Object object : objects) {
builder.push(object);
}
for (int i = objects.size() - 1; i >= 0; i--) {
Object object = objects.get(i);
assertThat(builder.peek()).isSameAs(object);
assertThat(builder.pop()).isSameAs(object);
}
}
@Test public void builderCanPopTo() {
History.Builder builder = History.emptyBuilder();
builder.push(ABLE);
builder.push(BAKER);
builder.push(CHARLIE);
builder.popTo(ABLE);
assertThat(builder.peek()).isSameAs(ABLE);
}
@Test public void builderPopToExplodesOnMissingState() {
History.Builder builder = History.emptyBuilder();
builder.push(ABLE);
builder.push(BAKER);
builder.push(CHARLIE);
try {
builder.popTo(new Object());
fail("Missing state object, should have thrown");
} catch (IllegalArgumentException ignored) {
// Correct!
}
}
@Test public void builderCanPopCount() {
History.Builder builder = History.emptyBuilder();
builder.push(ABLE);
builder.push(BAKER);
builder.push(CHARLIE);
builder.pop(1);
assertThat(builder.peek()).isSameAs(BAKER);
builder.pop(2);
assertThat(builder.isEmpty());
}
@Test public void builderPopExplodesIfCountIsTooLarge() {
History.Builder builder = History.emptyBuilder();
builder.push(ABLE);
builder.push(BAKER);
builder.push(CHARLIE);
try {
builder.pop(4);
fail("Count is too large, should have thrown");
} catch (IllegalArgumentException ignored) {
// Success!
}
}
@Test public void forwardIterator() {
List<Object> paths = new ArrayList<>(Arrays.<Object>asList(ABLE, BAKER, CHARLIE));
History history = History.emptyBuilder().pushAll(paths).build();
for (Object o : history) {
assertThat(o).isSameAs(paths.remove(paths.size() - 1));
}
}
@Test public void reverseIterator() {
List<Object> paths = new ArrayList<>(Arrays.<Object>asList(ABLE, BAKER, CHARLIE));
History history = History.emptyBuilder().pushAll(paths).build();
Iterator<Object> i = history.reverseIterator();
while (i.hasNext()) {
assertThat(i.next()).isSameAs(paths.remove(0));
}
}
@Test public void emptyBuilderPeekIsNullable() {
assertThat(History.emptyBuilder().peek()).isNull();
}
@Test public void emptyBuilderPopThrows() {
try {
History.emptyBuilder().pop();
fail("Should throw");
} catch (IllegalStateException e) {
// pass
}
}
@Test public void isEmpty() {
final History.Builder builder = History.emptyBuilder();
assertThat(builder.isEmpty()).isTrue();
builder.push("foo");
assertThat(builder.isEmpty()).isFalse();
builder.pop();
assertThat(builder.isEmpty()).isTrue();
}
@Test public void historyIndexAccess() {
History history = History.emptyBuilder().pushAll(asList(ABLE, BAKER, CHARLIE)).build();
assertThat(history.peek(0)).isEqualTo(CHARLIE);
assertThat(history.peek(1)).isEqualTo(BAKER);
assertThat(history.peek(2)).isEqualTo(ABLE);
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/test/java/flowless/ReentranceTest.java | flowless-library/src/test/java/flowless/ReentranceTest.java | /*
* Copyright 2014 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.support.annotation.NonNull;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Fail.fail;
import static org.mockito.MockitoAnnotations.initMocks;
public class ReentranceTest {
@Mock KeyManager keyManager;
@Mock
ServiceProvider serviceProvider;
Flow flow;
History lastStack;
TraversalCallback lastCallback;
@Before public void setUp() {
initMocks(this);
}
@Test public void reentrantGo() {
Dispatcher dispatcher = new Dispatcher() {
@Override public void dispatch(@NonNull Traversal navigation, @NonNull TraversalCallback callback) {
lastStack = navigation.destination;
Object next = navigation.destination.top();
if (next instanceof Detail) {
flow.set(new Loading());
} else if (next instanceof Loading) {
flow.set(new Error());
}
callback.onTraversalCompleted();
}
};
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(dispatcher);
flow.set(new Detail());
verifyHistory(lastStack, new Error(), new Loading(), new Detail(), new Catalog());
}
@Test public void reentrantGoThenBack() {
Dispatcher dispatcher = new Dispatcher() {
boolean loading = true;
@Override public void dispatch(@NonNull Traversal navigation, @NonNull TraversalCallback onComplete) {
lastStack = navigation.destination;
Object next = navigation.destination.top();
if (loading) {
if (next instanceof Detail) {
flow.set(new Loading());
} else if (next instanceof Loading) {
flow.set(new Error());
} else if (next instanceof Error) {
loading = false;
flow.setHistory(flow.getHistory().buildUpon().pop(1).build(), Direction.BACKWARD);
}
} else {
if (next instanceof Loading) {
flow.setHistory(flow.getHistory().buildUpon().pop(1).build(), Direction.BACKWARD);
}
}
onComplete.onTraversalCompleted();
}
};
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(dispatcher);
verifyHistory(lastStack, new Catalog());
flow.set(new Detail());
verifyHistory(lastStack, new Detail(), new Catalog());
}
@Test public void reentrantForwardThenGo() {
Flow flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastStack = traversal.destination;
Object next = traversal.destination.top();
if (next instanceof Detail) {
ReentranceTest.this.flow.setHistory(
History.emptyBuilder().push(new Detail()).push(new Loading()).build(), Direction.FORWARD);
} else if (next instanceof Loading) {
ReentranceTest.this.flow.set(new Error());
}
callback.onTraversalCompleted();
}
});
this.flow = flow;
flow.set(new Detail());
verifyHistory(lastStack, new Error(), new Loading(), new Detail());
}
@Test public void reentranceWaitsForCallback() {
Dispatcher dispatcher = new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastStack = traversal.destination;
lastCallback = callback;
Object next = traversal.destination.top();
if (next instanceof Detail) {
flow.set(new Loading());
} else if (next instanceof Loading) {
flow.set(new Error());
}
}
};
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(dispatcher);
lastCallback.onTraversalCompleted();
flow.set(new Detail());
verifyHistory(flow.getHistory(), new Catalog());
lastCallback.onTraversalCompleted();
verifyHistory(flow.getHistory(), new Detail(), new Catalog());
lastCallback.onTraversalCompleted();
verifyHistory(flow.getHistory(), new Loading(), new Detail(), new Catalog());
lastCallback.onTraversalCompleted();
verifyHistory(flow.getHistory(), new Error(), new Loading(), new Detail(), new Catalog());
}
@Test public void onCompleteThrowsIfCalledTwice() {
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastStack = traversal.destination;
lastCallback = callback;
}
});
lastCallback.onTraversalCompleted();
try {
lastCallback.onTraversalCompleted();
} catch (IllegalStateException e) {
return;
}
fail("Second call to onComplete() should have thrown.");
}
@Test public void bootstrapTraversal() {
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastStack = traversal.destination;
callback.onTraversalCompleted();
}
});
verifyHistory(lastStack, new Catalog());
}
@Test public void pendingTraversalReplacesBootstrap() {
final AtomicInteger dispatchCount = new AtomicInteger(0);
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.set(new Detail());
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
dispatchCount.incrementAndGet();
lastStack = traversal.destination;
callback.onTraversalCompleted();
}
});
verifyHistory(lastStack, new Detail(), new Catalog());
assertThat(dispatchCount.intValue()).isEqualTo(1);
}
@Test public void allPendingTraversalsFire() {
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.set(new Loading());
flow.set(new Detail());
flow.set(new Error());
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastCallback = callback;
}
});
lastCallback.onTraversalCompleted();
verifyHistory(flow.getHistory(), new Loading(), new Catalog());
lastCallback.onTraversalCompleted();
verifyHistory(flow.getHistory(), new Detail(), new Loading(), new Catalog());
}
@Test public void clearingDispatcherMidTraversalPauses() {
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
flow.set(new Loading());
flow.removeDispatcher(this);
callback.onTraversalCompleted();
}
});
verifyHistory(flow.getHistory(), new Catalog());
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
callback.onTraversalCompleted();
}
});
verifyHistory(flow.getHistory(), new Loading(), new Catalog());
}
@Test public void dispatcherSetInMidFlightWaitsForBootstrap() {
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastCallback = callback;
}
});
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastStack = traversal.destination;
callback.onTraversalCompleted();
}
});
assertThat(lastStack).isNull();
lastCallback.onTraversalCompleted();
verifyHistory(lastStack, new Catalog());
}
@Test public void dispatcherSetInMidFlightWithBigQueueNeedsNoBootstrap() {
final AtomicInteger secondDispatcherCount = new AtomicInteger(0);
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
flow.set(new Detail());
lastCallback = callback;
}
});
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
secondDispatcherCount.incrementAndGet();
lastStack = traversal.destination;
callback.onTraversalCompleted();
}
});
assertThat(lastStack).isNull();
lastCallback.onTraversalCompleted();
verifyHistory(lastStack, new Detail(), new Catalog());
assertThat(secondDispatcherCount.get()).isEqualTo(1);
}
@Test public void traversalsQueuedAfterDispatcherRemovedBootstrapTheNextOne() {
final AtomicInteger secondDispatcherCount = new AtomicInteger(0);
flow = new Flow(keyManager, serviceProvider, History.single(new Catalog()));
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastCallback = callback;
flow.removeDispatcher(this);
flow.set(new Loading());
}
});
verifyHistory(flow.getHistory(), new Catalog());
flow.setDispatcher(new Dispatcher() {
@Override public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
secondDispatcherCount.incrementAndGet();
callback.onTraversalCompleted();
}
});
assertThat(secondDispatcherCount.get()).isZero();
lastCallback.onTraversalCompleted();
assertThat(secondDispatcherCount.get()).isEqualTo(1);
verifyHistory(flow.getHistory(), new Loading(), new Catalog());
}
static class Catalog extends TestKey {
Catalog() {
super("catalog");
}
}
static class Detail extends TestKey {
Detail() {
super("detail");
}
}
static class Loading extends TestKey {
Loading() {
super("loading");
}
}
static class Error extends TestKey {
Error() {
super("error");
}
}
private void verifyHistory(History history, Object... keys) {
List<Object> actualKeys = new ArrayList<>(history.size());
for (Object entry : history) {
actualKeys.add(entry);
}
assertThat(actualKeys).containsExactly(keys);
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/test/java/flowless/FlowTest.java | flowless-library/src/test/java/flowless/FlowTest.java | /*
* Copyright 2013 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.content.Context;
import android.support.annotation.NonNull;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import java.util.Arrays;
import java.util.Iterator;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.mockito.MockitoAnnotations.initMocks;
public class FlowTest {
static class Uno {
}
static class Dos {
}
static class Tres {
}
final TestKey able = new TestKey("Able");
final TestKey baker = new TestKey("Baker");
final TestKey charlie = new TestKey("Charlie");
final TestKey delta = new TestKey("Delta");
@Mock
ServiceProvider serviceProvider;
@Mock KeyManager keyManager;
History lastStack;
Direction lastDirection;
class FlowDispatcher implements Dispatcher {
@Override
public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback) {
lastStack = traversal.destination;
lastDirection = traversal.direction;
callback.onTraversalCompleted();
}
}
@Before public void setUp() {
initMocks(this);
}
@Test public void oneTwoThree() {
History history = History.single(new Uno());
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
flow.set(new Dos());
assertThat(lastStack.top()).isInstanceOf(Dos.class);
assertThat(lastDirection).isSameAs(Direction.FORWARD);
flow.set(new Tres());
assertThat(lastStack.top()).isInstanceOf(Tres.class);
assertThat(lastDirection).isSameAs(Direction.FORWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isInstanceOf(Dos.class);
assertThat(lastDirection).isSameAs(Direction.BACKWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isInstanceOf(Uno.class);
assertThat(lastDirection).isSameAs(Direction.BACKWARD);
assertThat(flow.goBack()).isFalse();
}
@Test public void historyChangesAfterListenerCall() {
final History firstHistory = History.single(new Uno());
class Ourrobouros implements Dispatcher {
Flow flow = new Flow(keyManager, serviceProvider, firstHistory);
{
flow.setDispatcher(this);
}
@Override
public void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback onComplete) {
assertThat(firstHistory).hasSameSizeAs(flow.getHistory());
Iterator<Object> original = firstHistory.iterator();
for (Object o : flow.getHistory()) {
assertThat(o).isEqualTo(original.next());
}
onComplete.onTraversalCompleted();
}
}
Ourrobouros listener = new Ourrobouros();
listener.flow.set(new Dos());
}
@Test public void historyPushAllIsPushy() {
History history =
History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker, charlie)).build();
assertThat(history.size()).isEqualTo(3);
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(baker);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(able);
assertThat(flow.goBack()).isFalse();
}
@Test public void setHistoryWorks() {
History history = History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker)).build();
Flow flow = new Flow(keyManager, serviceProvider, history);
FlowDispatcher dispatcher = new FlowDispatcher();
flow.setDispatcher(dispatcher);
History newHistory =
History.emptyBuilder().pushAll(Arrays.<Object>asList(charlie, delta)).build();
flow.setHistory(newHistory, Direction.FORWARD);
assertThat(lastDirection).isSameAs(Direction.FORWARD);
assertThat(lastStack.top()).isSameAs(delta);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isSameAs(charlie);
assertThat(flow.goBack()).isFalse();
}
@Test public void setObjectGoesBack() {
History history =
History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker, charlie, delta)).build();
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(history.size()).isEqualTo(4);
flow.set(charlie);
assertThat(lastStack.top()).isEqualTo(charlie);
assertThat(lastStack.size()).isEqualTo(3);
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(baker);
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(able);
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isFalse();
}
@Test public void setObjectToMissingObjectPushes() {
History history = History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker)).build();
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(history.size()).isEqualTo(2);
flow.set(charlie);
assertThat(lastStack.top()).isEqualTo(charlie);
assertThat(lastStack.size()).isEqualTo(3);
assertThat(lastDirection).isEqualTo(Direction.FORWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(baker);
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(able);
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isFalse();
}
@Test public void setObjectKeepsOriginal() {
History history = History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker)).build();
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(history.size()).isEqualTo(2);
flow.set(new TestKey("Able"));
assertThat(lastStack.top()).isEqualTo(new TestKey("Able"));
assertThat(lastStack.top() == able).isTrue();
assertThat(lastStack.top()).isSameAs(able);
assertThat(lastStack.size()).isEqualTo(1);
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
}
@Test public void replaceHistoryResultsInLengthOneHistory() {
History history =
History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker, charlie)).build();
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(history.size()).isEqualTo(3);
flow.replaceHistory(delta, Direction.REPLACE);
assertThat(lastStack.top()).isEqualTo(new TestKey("Delta"));
assertThat(lastStack.top() == delta).isTrue();
assertThat(lastStack.top()).isSameAs(delta);
assertThat(lastStack.size()).isEqualTo(1);
assertThat(lastDirection).isEqualTo(Direction.REPLACE);
}
@Test public void replaceTopDoesNotAlterHistoryLength() {
History history =
History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker, charlie)).build();
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(history.size()).isEqualTo(3);
flow.replaceTop(delta, Direction.REPLACE);
assertThat(lastStack.top()).isEqualTo(new TestKey("Delta"));
assertThat(lastStack.top() == delta).isTrue();
assertThat(lastStack.top()).isSameAs(delta);
assertThat(lastStack.size()).isEqualTo(3);
assertThat(lastDirection).isEqualTo(Direction.REPLACE);
}
@SuppressWarnings({ "deprecation", "CheckResult" }) @Test public void setHistoryKeepsOriginals() {
TestKey able = new TestKey("Able");
TestKey baker = new TestKey("Baker");
TestKey charlie = new TestKey("Charlie");
TestKey delta = new TestKey("Delta");
History history =
History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker, charlie, delta)).build();
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(history.size()).isEqualTo(4);
TestKey echo = new TestKey("Echo");
TestKey foxtrot = new TestKey("Foxtrot");
History newHistory =
History.emptyBuilder().pushAll(Arrays.<Object>asList(able, baker, echo, foxtrot)).build();
flow.setHistory(newHistory, Direction.REPLACE);
assertThat(lastStack.size()).isEqualTo(4);
assertThat(lastStack.top()).isEqualTo(foxtrot);
flow.goBack();
assertThat(lastStack.size()).isEqualTo(3);
assertThat(lastStack.top()).isEqualTo(echo);
flow.goBack();
assertThat(lastStack.size()).isEqualTo(2);
assertThat(lastStack.top()).isSameAs(baker);
flow.goBack();
assertThat(lastStack.size()).isEqualTo(1);
assertThat(lastStack.top()).isSameAs(able);
}
static class Picky {
final String value;
Picky(String value) {
this.value = value;
}
@Override public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Picky picky = (Picky) o;
return value.equals(picky.value);
}
@Override public int hashCode() {
return value.hashCode();
}
}
@Test public void setCallsEquals() {
History history = History.emptyBuilder()
.pushAll(Arrays.<Object>asList(new Picky("Able"), new Picky("Baker"), new Picky("Charlie"),
new Picky("Delta")))
.build();
Flow flow = new Flow(keyManager, serviceProvider, history);
flow.setDispatcher(new FlowDispatcher());
assertThat(history.size()).isEqualTo(4);
flow.set(new Picky("Charlie"));
assertThat(lastStack.top()).isEqualTo(new Picky("Charlie"));
assertThat(lastStack.size()).isEqualTo(3);
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(new Picky("Baker"));
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isTrue();
assertThat(lastStack.top()).isEqualTo(new Picky("Able"));
assertThat(lastDirection).isEqualTo(Direction.BACKWARD);
assertThat(flow.goBack()).isFalse();
}
@Test public void incorrectFlowGetUsage() {
Context mockContext = Mockito.mock(Context.class);
//noinspection WrongConstant
Mockito.when(mockContext.getSystemService(Mockito.anyString())).thenReturn(null);
try {
Flow.get(mockContext);
fail("Flow was supposed to throw an exception on wrong usage");
} catch (IllegalStateException ignored) {
// That's good!
}
}
} | java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/test/java/flowless/TestKey.java | flowless-library/src/test/java/flowless/TestKey.java | /*
* Copyright 2014 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
class TestKey {
final String name;
TestKey(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TestKey key = (TestKey) o;
return name.equals(key.name);
}
@Override
public int hashCode() {
return name.hashCode();
}
@Override public String toString() {
return String.format("%s{%h}", name, this);
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/Dispatcher.java | flowless-library/src/main/java/flowless/Dispatcher.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.support.annotation.NonNull;
public interface Dispatcher {
/**
* Called when the history is about to change. Note that Flow does not consider the
* Traversal to be finished, and will not actually update the history, until the callback is
* triggered. Traversals cannot be canceled.
*
* @param callback Must be called to indicate completion of the traversal.
*/
void dispatch(@NonNull Traversal traversal, @NonNull TraversalCallback callback);
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/InternalContextWrapper.java | flowless-library/src/main/java/flowless/InternalContextWrapper.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.IntentSender;
import android.content.res.Resources;
import android.os.Bundle;
/*final*/ class InternalContextWrapper
extends ContextWrapper
implements KeyContextWrapper {
private final Activity activity;
private Flow flow;
private Object globalKey;
private static final String FLOW_NOT_YET_INITIALIZED = "Flow instance does not exist before `onPostCreate()`";
InternalContextWrapper(Context baseContext, Activity activity, Object globalKey) {
super(baseContext);
this.activity = activity;
this.globalKey = globalKey;
}
private Flow findFlow() {
if(flow == null) {
InternalLifecycleIntegration internalLifecycleIntegration = InternalLifecycleIntegration.find(activity);
if(internalLifecycleIntegration == null) {
throw new IllegalStateException(FLOW_NOT_YET_INITIALIZED);
}
flow = internalLifecycleIntegration.flow;
if(flow == null) {
throw new IllegalStateException(FLOW_NOT_YET_INITIALIZED);
}
}
return flow;
}
static Activity getActivity(Context context) {
//noinspection ResourceType
Activity activity = (Activity) context.getSystemService(ActivityUtils.ACTIVITY_SERVICE_TAG);
return activity;
}
@Override
public Object getSystemService(String name) {
if(KEY_SERVICE_TAG.equals(name)) {
return getKey();
} else if(Flow.SERVICE_TAG.equals(name)) {
return findFlow();
} else if(KeyManager.SERVICE_TAG.equals(name)) {
Flow flow = findFlow();
return flow.getStates();
} else if(ServiceProvider.SERVICE_TAG.equals(name)) {
Flow flow = findFlow();
return flow.getServices();
} else if(ActivityUtils.ACTIVITY_SERVICE_TAG.equals(name)) {
return activity;
} else {
return super.getSystemService(name);
}
}
@Override
public void startActivity(Intent intent) {
activity.startActivity(intent);
}
@TargetApi(16)
@Override
public void startActivity(Intent intent, Bundle options) {
activity.startActivity(intent, options);
}
@Override
public void startActivities(Intent[] intents) {
activity.startActivities(intents);
}
@TargetApi(16)
@Override
public void startActivities(Intent[] intents, Bundle options) {
activity.startActivities(intents, options);
}
@Override
public void startIntentSender(IntentSender intent, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
throws IntentSender.SendIntentException {
activity.startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags);
}
@TargetApi(16)
@Override
public void startIntentSender(IntentSender intent, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options)
throws IntentSender.SendIntentException {
activity.startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags, options);
}
@Override
public void setTheme(int resid) {
activity.setTheme(resid);
}
@Override
public Resources.Theme getTheme() {
return activity.getTheme();
}
@Override
public <T> T getKey() {
// noinspection unchecked
return (T) globalKey;
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/ServiceProvider.java | flowless-library/src/main/java/flowless/ServiceProvider.java | package flowless;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import static flowless.Preconditions.checkNotNull;
/**
* Created by Zhuinden on 2016.08.29..
*/
public class ServiceProvider {
public static final String SERVICE_TAG = "flowless.SERVICE_PROVIDER";
public static ServiceProvider get(@NonNull Context context) {
// noinspection ResourceType
return (ServiceProvider) context.getSystemService(SERVICE_TAG);
}
public static ServiceProvider get(@NonNull View view) {
return get(view.getContext());
}
public static class NoServiceException
extends RuntimeException {
private Object key;
private String serviceTag;
public NoServiceException(Object key, String serviceTag) {
super("No service found for serviceTag [" + serviceTag + "] for key [" + key + "]");
this.key = key;
this.serviceTag = serviceTag;
}
public Object getKey() {
return key;
}
public String getServiceTag() {
return serviceTag;
}
}
Map<Object, Map<String, Object>> services;
public ServiceProvider() {
services = new LinkedHashMap<>();
}
public <T> ServiceProvider bindService(View view, String serviceTag, T service) {
return bindService(Flow.getKey(view), serviceTag, service);
}
public <T> ServiceProvider bindService(Context context, String serviceTag, T service) {
return bindService(Flow.getKey(context), serviceTag, service);
}
public <T> ServiceProvider bindService(Object key, String serviceTag, T service) {
checkNotNull(key, "key");
checkNotNull(serviceTag, "serviceTag");
checkNotNull(service, "service");
if(!services.containsKey(key)) {
services.put(key, new HashMap<String, Object>());
}
Map<String, Object> serviceMap = services.get(key);
serviceMap.put(serviceTag, service);
return this;
}
public boolean hasService(View view, String serviceTag) {
return hasService(Flow.getKey(view), serviceTag);
}
public boolean hasService(Context context, String serviceTag) {
return hasService(Flow.getKey(context), serviceTag);
}
public boolean hasService(Object key, String serviceTag) {
checkNotNull(key, "key");
checkNotNull(serviceTag, "serviceTag");
if(!services.containsKey(key)) {
return false;
}
Map<String, Object> serviceMap = services.get(key);
return serviceMap.containsKey(serviceTag);
}
@NonNull
public <T> T getService(View view, String serviceTag) {
return getService(Flow.getKey(view), serviceTag);
}
@NonNull
public <T> T getService(Context context, String serviceTag) {
return getService(Flow.getKey(context), serviceTag);
}
@NonNull
public <T> T getService(Object key, String serviceTag) {
checkNotNull(key, "key");
checkNotNull(serviceTag, "serviceTag");
if(!services.containsKey(key)) {
throw new NoServiceException(key, serviceTag);
}
Map<String, Object> serviceMap = services.get(key);
if(serviceMap.containsKey(serviceTag)) {
//noinspection unchecked
return (T) serviceMap.get(serviceTag);
} else {
throw new NoServiceException(key, serviceTag);
}
}
@Nullable
public Map<String, Object> unbindServices(View view) {
return unbindServices(Flow.getKey(view));
}
@Nullable
public Map<String, Object> unbindServices(Context context) {
return unbindServices(Flow.getKey(context));
}
@Nullable
public Map<String, Object> unbindServices(Object key) {
checkNotNull(key, "key");
return services.remove(key);
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/ForceBundler.java | flowless-library/src/main/java/flowless/ForceBundler.java | package flowless;
import android.view.View;
import flowless.preset.FlowLifecycles;
/**
* Created by Zhuinden on 2016.03.02..
*/
public class ForceBundler {
public static void saveToBundle(View... activeViews) {
if(activeViews != null && activeViews.length > 0) {
for(View view : activeViews) {
if(view != null) {
KeyManager keyManager = KeyManager.get(view);
State state = keyManager.getState(Flow.getKey(view));
state.save(view);
if(view instanceof Bundleable) {
state.setBundle(((Bundleable) view).toBundle());
}
}
}
}
}
public static void restoreFromBundle(View... activeViews) {
if(activeViews != null && activeViews.length > 0) {
for(View view : activeViews) {
if(view != null) {
KeyManager keyManager = KeyManager.get(view);
State state = keyManager.getState(Flow.getKey(view));
if(state != null) {
state.restore(view);
if(view instanceof Bundleable) {
((Bundleable) view).fromBundle(state.getBundle());
}
}
}
if(view instanceof FlowLifecycles.ViewLifecycleListener) {
((FlowLifecycles.ViewLifecycleListener) view).onViewRestored();
}
}
}
}
} | java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/KeyContextWrapper.java | flowless-library/src/main/java/flowless/KeyContextWrapper.java | package flowless;
import android.content.Context;
/**
* Created by Zhuinden on 2016.12.18..
*/
public interface KeyContextWrapper {
public static final String KEY_SERVICE_TAG = "flowless.KEY";
public class Methods {
private Methods() {
}
@SuppressWarnings("unchecked")
public static <T> T getKey(Context context) {
//noinspection ResourceType
return (T) context.getSystemService(KEY_SERVICE_TAG);
}
}
<T> T getKey();
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/InternalLifecycleIntegration.java | flowless-library/src/main/java/flowless/InternalLifecycleIntegration.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.app.Activity;
import android.app.Application;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.Nullable;
import java.util.ArrayList;
import java.util.Iterator;
import flowless.preset.FlowLifecycles;
import static flowless.Preconditions.checkArgument;
import static flowless.Preconditions.checkNotNull;
/**
* Pay no attention to this class. It's only public because it has to be.
*/
public /*final*/ class InternalLifecycleIntegration
extends Fragment {
static final String INTENT_KEY = "Flow_history";
static final String TAG = "flow-lifecycle-integration";
static final String PERSISTENCE_KEY = "Flow_state";
static InternalLifecycleIntegration find(Activity activity) {
return (InternalLifecycleIntegration) activity.getFragmentManager().findFragmentByTag(TAG);
}
static void install(final Application app, final Activity activity, @Nullable final KeyParceler parceler, final History defaultHistory, final Dispatcher dispatcher, final ServiceProvider serviceProvider, final KeyManager keyManager) {
app.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
@Override
public void onActivityCreated(Activity a, Bundle savedInstanceState) {
if(a == activity) {
InternalLifecycleIntegration fragment = find(activity);
boolean newFragment = fragment == null;
if(newFragment) {
fragment = new InternalLifecycleIntegration();
}
if(fragment.keyManager == null) {
fragment.defaultHistory = defaultHistory;
fragment.parceler = parceler;
fragment.keyManager = keyManager;
fragment.serviceProvider = serviceProvider;
}
// We always replace the dispatcher because it frequently references the Activity.
fragment.dispatcher = dispatcher;
fragment.intent = a.getIntent();
if(newFragment) {
activity.getFragmentManager() //
.beginTransaction() //
.add(fragment, TAG) //
.commit();
}
app.unregisterActivityLifecycleCallbacks(this);
}
}
@Override
public void onActivityStarted(Activity activity) {
}
@Override
public void onActivityResumed(Activity activity) {
}
@Override
public void onActivityPaused(Activity activity) {
}
@Override
public void onActivityStopped(Activity activity) {
}
@Override
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
}
@Override
public void onActivityDestroyed(Activity a) {
}
});
}
Flow flow;
KeyManager keyManager;
ServiceProvider serviceProvider;
@Nullable
KeyParceler parceler;
History defaultHistory;
Dispatcher dispatcher;
Intent intent;
public InternalLifecycleIntegration() {
super();
setRetainInstance(true);
}
static void addHistoryToIntent(Intent intent, History history, KeyParceler parceler, KeyManager keyManager) {
Bundle bundle = new Bundle();
Bundle innerBundle = new Bundle();
ArrayList<Parcelable> parcelables = new ArrayList<>(history.size());
final Iterator<Object> keys = history.reverseIterator();
while(keys.hasNext()) {
Object key = keys.next();
State keyState;
if(keyManager != null && keyManager.hasState(key)) {
keyState = keyManager.getState(key);
} else {
keyState = State.empty(key);
}
parcelables.add(keyState.toBundle(parceler));
}
innerBundle.putParcelableArrayList(KeyManager.HISTORY_KEYS, parcelables);
if(keyManager != null) {
innerBundle.putParcelableArrayList(KeyManager.GLOBAL_KEYS,
collectStatesFromKeys(keyManager, parceler, keyManager.globalKeys.iterator(), keyManager.globalKeys.size()));
innerBundle.putParcelableArrayList(KeyManager.REGISTERED_KEYS,
collectStatesFromKeys(keyManager, parceler, keyManager.registeredKeys.iterator(), keyManager.registeredKeys.size()));
}
bundle.putBundle(PERSISTENCE_KEY, innerBundle);
intent.putExtra(INTENT_KEY, bundle);
}
void onNewIntent(Intent intent) {
if(intent.hasExtra(INTENT_KEY)) {
checkNotNull(parceler, "Intent has a Flow history extra, but Flow was not installed with a KeyParceler");
History.Builder builder = History.emptyBuilder();
load(intent.<Bundle>getParcelableExtra(INTENT_KEY), parceler, builder, keyManager);
flow.setHistory(builder.build(), Direction.REPLACE);
}
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if(flow == null) {
History savedHistory = null;
if(savedInstanceState != null && savedInstanceState.containsKey(INTENT_KEY)) {
checkNotNull(parceler, "no KeyParceler installed");
History.Builder builder = History.emptyBuilder();
Bundle bundle = savedInstanceState.getBundle(INTENT_KEY);
load(bundle, parceler, builder, keyManager);
savedHistory = builder.build();
}
History history = selectHistory(intent, savedHistory, defaultHistory, parceler, keyManager);
flow = new Flow(keyManager, serviceProvider, history);
}
Flow.get(getActivity().getBaseContext()); // force existence of Flow in InternalContextWrapper
flow.setDispatcher(dispatcher, true);
if(dispatcher instanceof FlowLifecycles.CreateDestroyListener) {
((FlowLifecycles.CreateDestroyListener) dispatcher).onCreate(savedInstanceState);
}
}
@Override
public void onStart() {
super.onStart();
if(dispatcher instanceof FlowLifecycles.StartStopListener) {
((FlowLifecycles.StartStopListener) dispatcher).onStart();
}
}
@Override
public void onResume() {
super.onResume();
if(!flow.hasDispatcher()) {
flow.setDispatcher(dispatcher, false);
}
if(dispatcher instanceof FlowLifecycles.ResumePauseListener) {
((FlowLifecycles.ResumePauseListener) dispatcher).onResume();
}
}
@Override
public void onPause() {
if(dispatcher instanceof FlowLifecycles.ResumePauseListener) {
((FlowLifecycles.ResumePauseListener) dispatcher).onPause();
}
if(flow.hasDispatcher()) {
flow.removeDispatcher(dispatcher);
}
super.onPause();
}
@Override
public void onStop() {
if(dispatcher instanceof FlowLifecycles.StartStopListener) {
((FlowLifecycles.StartStopListener) dispatcher).onStop();
}
super.onStop();
}
@Override
public void onDestroyView() {
if(dispatcher instanceof FlowLifecycles.CreateDestroyListener) {
((FlowLifecycles.CreateDestroyListener) dispatcher).onDestroy();
}
if(flow != null) {
flow.executePendingTraversal();
}
super.onDestroyView();
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
if(dispatcher instanceof FlowLifecycles.ViewStatePersistenceListener) {
((FlowLifecycles.ViewStatePersistenceListener) dispatcher).onSaveInstanceState(outState);
}
checkArgument(outState != null, "outState may not be null");
if(parceler == null) {
return;
}
Bundle bundle = new Bundle();
save(bundle, parceler, flow.getHistory(), keyManager);
if(!bundle.isEmpty()) {
outState.putParcelable(INTENT_KEY, bundle);
}
}
private static History selectHistory(Intent intent, History saved, History defaultHistory, @Nullable KeyParceler parceler, KeyManager keyManager) {
if(saved != null) {
return saved;
}
if(intent != null && intent.hasExtra(INTENT_KEY)) {
checkNotNull(parceler, "Intent has a Flow history extra, but Flow was not installed with a KeyParceler");
History.Builder history = History.emptyBuilder();
load(intent.<Bundle>getParcelableExtra(INTENT_KEY), parceler, history, keyManager);
return history.build();
}
return defaultHistory;
}
private static void save(Bundle bundle, KeyParceler parceler, History history, KeyManager keyManager) {
ArrayList<Parcelable> historyStates = collectStatesFromKeys(keyManager, parceler, history.reverseIterator(), history.size());
ArrayList<Parcelable> globalStates = collectStatesFromKeys(keyManager,
parceler,
keyManager.globalKeys.iterator(),
keyManager.globalKeys.size());
ArrayList<Parcelable> registeredKeyStates = collectStatesFromKeys(keyManager,
parceler,
keyManager.registeredKeys.iterator(),
keyManager.registeredKeys.size());
Bundle innerBundle = new Bundle();
innerBundle.putParcelableArrayList(KeyManager.GLOBAL_KEYS, globalStates);
innerBundle.putParcelableArrayList(KeyManager.HISTORY_KEYS, historyStates);
innerBundle.putParcelableArrayList(KeyManager.REGISTERED_KEYS, registeredKeyStates);
bundle.putBundle(PERSISTENCE_KEY, innerBundle);
}
private static ArrayList<Parcelable> collectStatesFromKeys(KeyManager keyManager, KeyParceler parceler, Iterator<Object> keys, int size) {
ArrayList<Parcelable> parcelables = new ArrayList<>(size);
while(keys.hasNext()) {
Object key = keys.next();
if(!key.getClass().isAnnotationPresent(NotPersistent.class)) {
parcelables.add(keyManager.getState(key).toBundle(parceler));
}
}
return parcelables;
}
private static void loadStatesIntoManager(ArrayList<Parcelable> stateBundles, KeyParceler parceler, KeyManager keyManager, History.Builder builder, boolean addToHistory, boolean addToRegisteredKeys) {
if(stateBundles != null) {
for(Parcelable stateBundle : stateBundles) {
State state = State.fromBundle((Bundle) stateBundle, parceler);
if(addToHistory) {
builder.push(state.getKey());
}
if(addToRegisteredKeys) {
keyManager.registeredKeys.add(state.getKey());
}
if(!keyManager.hasState(state.getKey())) {
keyManager.addState(state);
}
}
}
}
private static void load(Bundle bundle, KeyParceler parceler, History.Builder builder, KeyManager keyManager) {
if(!bundle.containsKey(PERSISTENCE_KEY)) {
return;
}
Bundle innerBundle = bundle.getBundle(PERSISTENCE_KEY);
if(innerBundle != null) {
//noinspection ConstantConditions
loadStatesIntoManager(innerBundle.getParcelableArrayList(KeyManager.REGISTERED_KEYS),
parceler,
keyManager,
builder,
false,
true);
loadStatesIntoManager(innerBundle.getParcelableArrayList(KeyManager.HISTORY_KEYS), parceler, keyManager, builder, true, false);
loadStatesIntoManager(innerBundle.getParcelableArrayList(KeyManager.GLOBAL_KEYS), parceler, keyManager, builder, false, false);
}
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/FlowContextWrapper.java | flowless-library/src/main/java/flowless/FlowContextWrapper.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.content.Context;
import android.content.ContextWrapper;
import android.view.LayoutInflater;
/*final*/ class FlowContextWrapper
extends ContextWrapper
implements KeyContextWrapper {
final Object key;
private LayoutInflater inflater;
FlowContextWrapper(Object key, Context baseContext) {
super(baseContext);
this.key = key;
}
@Override
public Object getSystemService(String name) {
if(KEY_SERVICE_TAG.equals(name)) {
return key;
}
if(LAYOUT_INFLATER_SERVICE.equals(name)) {
if(inflater == null) {
inflater = LayoutInflater.from(getBaseContext()).cloneInContext(this);
}
return inflater;
}
return super.getSystemService(name);
}
@Override
public <T> T getKey() {
//noinspection unchecked
return (T) key;
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/NotPersistent.java | flowless-library/src/main/java/flowless/NotPersistent.java | /*
* Copyright 2015 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Applied to a state object, indicates that it should not be persisted with the history.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface NotPersistent {
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/Bundleable.java | flowless-library/src/main/java/flowless/Bundleable.java | package flowless;
import android.os.Bundle;
import android.support.annotation.Nullable;
/**
* Created by Zhuinden on 2016.07.01..
*/
public interface Bundleable {
Bundle toBundle();
void fromBundle(@Nullable Bundle bundle);
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/History.java | flowless-library/src/main/java/flowless/History.java | /*
* Copyright 2013 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Locale;
import static flowless.Preconditions.checkArgument;
import static java.util.Collections.unmodifiableList;
/**
* Describes the history of a {@link Flow} at a specific point in time.
*/
public /*final*/ class History
implements Iterable<Object> {
private final List<Object> history;
@NonNull
public static Builder emptyBuilder() {
return new Builder(Collections.emptyList());
}
/**
* Create a history that contains a single key.
*/
@NonNull
public static History single(@NonNull Object key) {
return emptyBuilder().push(key).build();
}
private History(List<Object> history) {
checkArgument(history != null && !history.isEmpty(), "History may not be empty");
this.history = history;
}
@NonNull
public <T> Iterator<T> reverseIterator() {
return new ReadStateIterator<>(history.iterator());
}
@NonNull
@Override
public Iterator<Object> iterator() {
return new ReadStateIterator<>(new ReverseIterator<>(history));
}
public int size() {
return history.size();
}
@NonNull
public <T> T top() {
return peek(0);
}
/**
* Returns the app state at the provided index in history. 0 is the newest entry.
*/
@NonNull
public <T> T peek(int index) {
//noinspection unchecked
return (T) history.get(history.size() - index - 1);
}
@NonNull
List<Object> asList() {
final ArrayList<Object> copy = new ArrayList<>(history);
return unmodifiableList(copy);
}
/**
* Get a builder to modify a copy of this history.
* <p>
* The builder returned will retain all internal information related to the keys in the
* history, including their states. It is safe to remove keys from the builder and push them back
* on; nothing will be lost in those operations.
*/
@NonNull
public Builder buildUpon() {
return new Builder(history);
}
@Override
public String toString() {
return Arrays.deepToString(history.toArray());
}
public static /*final*/ class Builder {
private final List<Object> history;
private Builder(Collection<Object> history) {
this.history = new ArrayList<>(history);
}
/**
* Removes all keys from this builder. But note that if this builder was created
* via {@link #buildUpon()}, any state associated with the cleared
* keys will be preserved and will be restored if they are {@link #push pushed}
* back on.
*/
@NonNull
public Builder clear() {
// Clear by popping everything (rather than just calling history.clear()) to
// fill up entryMemory. Otherwise we drop view state on the floor.
while(!isEmpty()) {
pop();
}
return this;
}
/**
* Adds a key to the builder. If this builder was created via {@link #buildUpon()},
* and the pushed key was previously {@link #pop() popped} or {@link #clear cleared}
* from the builder, the key's associated state will be restored.
*/
@NonNull
public Builder push(@NonNull Object key) {
history.add(key);
return this;
}
/**
* {@link #push Pushes} all of the keys in the collection onto this builder.
*/
@NonNull
public Builder pushAll(@NonNull Collection<?> c) {
for(Object key : c) {
//noinspection CheckResult
push(key);
}
return this;
}
/**
* @return null if the history is empty.
*/
@Nullable
public Object peek() {
return history.isEmpty() ? null : history.get(history.size() - 1);
}
@NonNull
public boolean isEmpty() {
return history.isEmpty();
}
/**
* Removes the last state added. Note that if this builder was created
* via {@link #buildUpon()}, any view state associated with the popped
* state will be preserved, and restored if it is {@link #push pushed}
* back in.
*
* @throws IllegalStateException if empty
*/
public Object pop() {
if(isEmpty()) {
throw new IllegalStateException("Cannot pop from an empty builder");
}
return history.remove(history.size() - 1);
}
/**
* Pops the history until the given state is at the top.
*
* @throws IllegalArgumentException if the given state isn't in the history.
*/
@NonNull
public Builder popTo(@NonNull Object state) {
//noinspection ConstantConditions
while(!isEmpty() && !peek().equals(state)) {
pop();
}
checkArgument(!isEmpty(), String.format("%s not found in history", state));
return this;
}
@NonNull
public Builder pop(int count) {
final int size = history.size();
checkArgument(count <= size, String.format((Locale) null, "Cannot pop %d elements, history only has %d", count, size));
while(count-- > 0) {
pop();
}
return this;
}
@NonNull
public History build() {
return new History(history);
}
@Override
public String toString() {
return Arrays.deepToString(history.toArray());
}
}
private static class ReverseIterator<T>
implements Iterator<T> {
private final ListIterator<T> wrapped;
ReverseIterator(List<T> list) {
wrapped = list.listIterator(list.size());
}
@Override
public boolean hasNext() {
return wrapped.hasPrevious();
}
@Override
public T next() {
return wrapped.previous();
}
@Override
public void remove() {
wrapped.remove();
}
}
private static class ReadStateIterator<T>
implements Iterator<T> {
private final Iterator<Object> iterator;
ReadStateIterator(Iterator<Object> iterator) {
this.iterator = iterator;
}
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public T next() {
//noinspection unchecked
return (T) iterator.next();
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/TraversalCallback.java | flowless-library/src/main/java/flowless/TraversalCallback.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
/**
* Supplied by Flow to the Listener, which is responsible for calling onComplete().
*/
public interface TraversalCallback {
/**
* Must be called exactly once to indicate that the corresponding transition has completed.
*
* If not called, the history will not be updated and further calls to Flow will not execute.
* Calling more than once will result in an exception.
*/
void onTraversalCompleted();
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/ClassKey.java | flowless-library/src/main/java/flowless/ClassKey.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
/**
* Convenience base class for keys. All instances of a given subclass are equal.
*/
public abstract class ClassKey {
@Override
public boolean equals(Object o) {
return this == o || (o != null && getClass() == o.getClass());
}
@Override
public int hashCode() {
return getClass().hashCode();
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Zhuinden/flowless | https://github.com/Zhuinden/flowless/blob/a958f08cd91352ad5430fb3bce986e6b132f5cd9/flowless-library/src/main/java/flowless/State.java | flowless-library/src/main/java/flowless/State.java | /*
* Copyright 2016 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flowless;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.SparseArray;
import android.view.View;
public class State {
/**
* Creates a State instance that has no state and is effectively immutable.
*/
@NonNull
public static State empty(@NonNull final Object key) {
return new State(key);
}
@NonNull
static State fromBundle(@NonNull Bundle savedState, @NonNull KeyParceler parceler) {
Object key = parceler.toKey(savedState.getParcelable("KEY"));
State state = new State(key);
state.viewState = savedState.getSparseParcelableArray("VIEW_STATE");
state.bundle = savedState.getBundle("BUNDLE");
return state;
}
private final Object key;
@Nullable
private Bundle bundle;
@Nullable
SparseArray<Parcelable> viewState;
State(Object key) {
// No external instances.
this.key = key;
}
@NonNull
public final <T> T getKey() {
@SuppressWarnings("unchecked") final T state = (T) key;
return state;
}
public void save(@NonNull View view) {
SparseArray<Parcelable> state = new SparseArray<>();
view.saveHierarchyState(state);
viewState = state;
}
public void restore(@NonNull View view) {
if(viewState != null) {
view.restoreHierarchyState(viewState);
}
}
public void setBundle(@Nullable Bundle bundle) {
this.bundle = bundle;
}
@Nullable
public Bundle getBundle() {
return bundle;
}
Bundle toBundle(KeyParceler parceler) {
Bundle outState = new Bundle();
outState.putParcelable("KEY", parceler.toParcelable(getKey()));
if(viewState != null && viewState.size() > 0) {
outState.putSparseParcelableArray("VIEW_STATE", viewState);
}
if(bundle != null && !bundle.isEmpty()) {
outState.putBundle("BUNDLE", bundle);
}
return outState;
}
@Override
public boolean equals(Object o) {
if(this == o) {
return true;
}
if(o == null || getClass() != o.getClass()) {
return false;
}
State state = (State) o;
return (getKey().equals(state.getKey()));
}
@Override
public int hashCode() {
return getKey().hashCode();
}
@Override
public String toString() {
return getKey().toString();
}
}
| java | Apache-2.0 | a958f08cd91352ad5430fb3bce986e6b132f5cd9 | 2026-01-05T02:40:56.157166Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.