All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.gdface.facelog.db.PermitBean Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
// ______________________________________________________
// Generated by sql2java - https://github.com/10km/sql2java 
// JDBC driver used at code generation time: com.mysql.jdbc.Driver
// template: bean.java.vm
// ______________________________________________________
package net.gdface.facelog.db;
import java.io.Serializable;
import java.util.Objects;

import gu.sql2java.BaseRow;

import com.facebook.swift.codec.ThriftStruct;
import com.facebook.swift.codec.ThriftField;
import com.facebook.swift.codec.ThriftField.Requiredness;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import net.gdface.annotation.CodegenLength;
import net.gdface.annotation.CodegenRequired;
import net.gdface.annotation.CodegenInvalidValue;
/**
 * PermitBean is a mapping of fl_permit Table.
 * 
Meta Data Information (in progress): *
    *
  • comments: 通行权限关联表
  • *
* @author guyadong */ @ThriftStruct @ApiModel(description="通行权限关联表") public final class PermitBean extends BaseRow implements Serializable,Constant { private static final long serialVersionUID = 1996786947221016855L; /** comments:外键,设备组id */ @ApiModelProperty(value = "外键,设备组id" ,required=true ,dataType="Integer") @CodegenRequired@CodegenInvalidValue("0") private Integer deviceGroupId; /** comments:外键,人员组id */ @ApiModelProperty(value = "外键,人员组id" ,required=true ,dataType="Integer") @CodegenRequired@CodegenInvalidValue("0") private Integer personGroupId; /** comments:允许通行时间表,为null或空为7x24小时工作,格式为JSON,参见开发手册 */ @ApiModelProperty(value = "允许通行时间表,为null或空为7x24小时工作,格式为JSON,参见开发手册" ,dataType="String") @CodegenLength(max=4096)@CodegenInvalidValue private String schedule; /** comments:通行次/天数限制定义,为null或空不限制,JSON格式字符串,参见开发手册 */ @ApiModelProperty(value = "通行次/天数限制定义,为null或空不限制,JSON格式字符串,参见开发手册" ,dataType="String") @CodegenLength(max=512)@CodegenInvalidValue private String passLimit; /** comments:备注 */ @ApiModelProperty(value = "备注" ,dataType="String") @CodegenLength(max=256)@CodegenInvalidValue private String remark; /** comments:应用项目自定义二进制扩展字段(最大64KB) */ @ApiModelProperty(value = "应用项目自定义二进制扩展字段(最大64KB)" ,dataType="ByteBuffer") @CodegenLength(max=65535)@CodegenInvalidValue private java.nio.ByteBuffer extBin; /** comments:应用项目自定义文本扩展字段(最大64KB) */ @ApiModelProperty(value = "应用项目自定义文本扩展字段(最大64KB)" ,dataType="String") @CodegenLength(max=65535)@CodegenInvalidValue private String extTxt; @ApiModelProperty(value = "create_time" ,dataType="Date") @CodegenInvalidValue("0") private java.util.Date createTime; /** columns modified flag */ @ApiModelProperty(value="columns modified flag",dataType="int",required=true) private int modified; /** columns initialized flag */ @ApiModelProperty(value="columns initialized flag",dataType="int",required=true) private int initialized; /** new record flag */ @ApiModelProperty(value="new record flag",dataType="boolean",required=true) private boolean isNew; @ThriftField(value=1,name="_new",requiredness=Requiredness.REQUIRED) @Override public boolean isNew() { return this.isNew; } /** * Specifies to the object if it has been set as new. * * @param isNew the boolean value to be assigned to the isNew field */ @ThriftField() @Override public void setNew(boolean isNew) { this.isNew = isNew; } /** * @return the modified status of columns */ @ThriftField(value=2,requiredness=Requiredness.REQUIRED) @Override public int getModified(){ return modified; } /** * @param modified the modified status bit to be assigned to {@link #modified} */ @ThriftField() @Override public void setModified(int modified){ this.modified = modified; } /** * @return the initialized status of columns */ @ThriftField(value=3,requiredness=Requiredness.REQUIRED) @Override public int getInitialized(){ return initialized; } /** * @param initialized the initialized status bit to be assigned to {@link #initialized} */ @ThriftField() @Override public void setInitialized(int initialized){ this.initialized = initialized; } public PermitBean(){ reset(); } /** * construct a new instance filled with primary keys * @param deviceGroupId PK# 1 @param personGroupId PK# 2 */ public PermitBean(Integer deviceGroupId,Integer personGroupId){ setDeviceGroupId(deviceGroupId); setPersonGroupId(personGroupId); } /** * Getter method for {@link #deviceGroupId}.
* PRIMARY KEY.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.device_group_id
  • *
  • foreign key: fl_device_group.id
  • *
  • comments: 外键,设备组id
  • *
  • NOT NULL
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of deviceGroupId */ @ThriftField(value=4) @JsonProperty("deviceGroupId") public Integer getDeviceGroupId(){ return deviceGroupId; } /** * Setter method for {@link #deviceGroupId}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value( NOT NULL) to be assigned to deviceGroupId */ @ThriftField(name="deviceGroupId") @JsonProperty("deviceGroupId") public void setDeviceGroupId(Integer newVal) { modified |= FL_PERMIT_ID_DEVICE_GROUP_ID_MASK; initialized |= FL_PERMIT_ID_DEVICE_GROUP_ID_MASK; if (Objects.equals(newVal, deviceGroupId)) { return; } deviceGroupId = newVal; } /** * Setter method for {@link #deviceGroupId}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to deviceGroupId */ @JsonIgnore public void setDeviceGroupId(int newVal) { setDeviceGroupId(new Integer(newVal)); } /** * Determines if the deviceGroupId has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkDeviceGroupIdModified() { return 0 != (modified & FL_PERMIT_ID_DEVICE_GROUP_ID_MASK); } /** * Determines if the deviceGroupId has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkDeviceGroupIdInitialized() { return 0 != (initialized & FL_PERMIT_ID_DEVICE_GROUP_ID_MASK); } /** * Getter method for {@link #personGroupId}.
* PRIMARY KEY.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.person_group_id
  • *
  • foreign key: fl_person_group.id
  • *
  • comments: 外键,人员组id
  • *
  • NOT NULL
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of personGroupId */ @ThriftField(value=5) @JsonProperty("personGroupId") public Integer getPersonGroupId(){ return personGroupId; } /** * Setter method for {@link #personGroupId}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value( NOT NULL) to be assigned to personGroupId */ @ThriftField(name="personGroupId") @JsonProperty("personGroupId") public void setPersonGroupId(Integer newVal) { modified |= FL_PERMIT_ID_PERSON_GROUP_ID_MASK; initialized |= FL_PERMIT_ID_PERSON_GROUP_ID_MASK; if (Objects.equals(newVal, personGroupId)) { return; } personGroupId = newVal; } /** * Setter method for {@link #personGroupId}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to personGroupId */ @JsonIgnore public void setPersonGroupId(int newVal) { setPersonGroupId(new Integer(newVal)); } /** * Determines if the personGroupId has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkPersonGroupIdModified() { return 0 != (modified & FL_PERMIT_ID_PERSON_GROUP_ID_MASK); } /** * Determines if the personGroupId has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkPersonGroupIdInitialized() { return 0 != (initialized & FL_PERMIT_ID_PERSON_GROUP_ID_MASK); } /** * Getter method for {@link #schedule}.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.schedule
  • *
  • comments: 允许通行时间表,为null或空为7x24小时工作,格式为JSON,参见开发手册
  • *
  • column size: 4096
  • *
  • JDBC type returned by the driver: Types.VARCHAR
  • *
* * @return the value of schedule */ @ThriftField(value=6) @JsonProperty("schedule") public String getSchedule(){ return schedule; } /** * Setter method for {@link #schedule}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value to be assigned to schedule */ @ThriftField(name="schedule") @JsonProperty("schedule") public void setSchedule(String newVal) { modified |= FL_PERMIT_ID_SCHEDULE_MASK; initialized |= FL_PERMIT_ID_SCHEDULE_MASK; if (Objects.equals(newVal, schedule)) { return; } schedule = newVal; } /** * Determines if the schedule has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkScheduleModified() { return 0 != (modified & FL_PERMIT_ID_SCHEDULE_MASK); } /** * Determines if the schedule has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkScheduleInitialized() { return 0 != (initialized & FL_PERMIT_ID_SCHEDULE_MASK); } /** * Getter method for {@link #passLimit}.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.pass_limit
  • *
  • comments: 通行次/天数限制定义,为null或空不限制,JSON格式字符串,参见开发手册
  • *
  • column size: 512
  • *
  • JDBC type returned by the driver: Types.VARCHAR
  • *
* * @return the value of passLimit */ @ThriftField(value=7) @JsonProperty("passLimit") public String getPassLimit(){ return passLimit; } /** * Setter method for {@link #passLimit}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value to be assigned to passLimit */ @ThriftField(name="passLimit") @JsonProperty("passLimit") public void setPassLimit(String newVal) { modified |= FL_PERMIT_ID_PASS_LIMIT_MASK; initialized |= FL_PERMIT_ID_PASS_LIMIT_MASK; if (Objects.equals(newVal, passLimit)) { return; } passLimit = newVal; } /** * Determines if the passLimit has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkPassLimitModified() { return 0 != (modified & FL_PERMIT_ID_PASS_LIMIT_MASK); } /** * Determines if the passLimit has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkPassLimitInitialized() { return 0 != (initialized & FL_PERMIT_ID_PASS_LIMIT_MASK); } /** * Getter method for {@link #remark}.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.remark
  • *
  • comments: 备注
  • *
  • column size: 256
  • *
  • JDBC type returned by the driver: Types.VARCHAR
  • *
* * @return the value of remark */ @ThriftField(value=8) @JsonProperty("remark") public String getRemark(){ return remark; } /** * Setter method for {@link #remark}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value to be assigned to remark */ @ThriftField(name="remark") @JsonProperty("remark") public void setRemark(String newVal) { modified |= FL_PERMIT_ID_REMARK_MASK; initialized |= FL_PERMIT_ID_REMARK_MASK; if (Objects.equals(newVal, remark)) { return; } remark = newVal; } /** * Determines if the remark has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkRemarkModified() { return 0 != (modified & FL_PERMIT_ID_REMARK_MASK); } /** * Determines if the remark has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkRemarkInitialized() { return 0 != (initialized & FL_PERMIT_ID_REMARK_MASK); } /** * Getter method for {@link #extBin}.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.ext_bin
  • *
  • comments: 应用项目自定义二进制扩展字段(最大64KB)
  • *
  • column size: 65535
  • *
  • JDBC type returned by the driver: Types.LONGVARBINARY
  • *
* * @return the value of extBin */ @ThriftField(value=9) @JsonProperty("extBin") public java.nio.ByteBuffer getExtBin(){ return extBin; } /** * Setter method for {@link #extBin}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value to be assigned to extBin */ @ThriftField(name="extBin") @JsonProperty("extBin") public void setExtBin(java.nio.ByteBuffer newVal) { modified |= FL_PERMIT_ID_EXT_BIN_MASK; initialized |= FL_PERMIT_ID_EXT_BIN_MASK; if (Objects.equals(newVal, extBin)) { return; } extBin = newVal; } /** * Determines if the extBin has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkExtBinModified() { return 0 != (modified & FL_PERMIT_ID_EXT_BIN_MASK); } /** * Determines if the extBin has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkExtBinInitialized() { return 0 != (initialized & FL_PERMIT_ID_EXT_BIN_MASK); } /** * Getter method for {@link #extTxt}.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.ext_txt
  • *
  • comments: 应用项目自定义文本扩展字段(最大64KB)
  • *
  • column size: 65535
  • *
  • JDBC type returned by the driver: Types.LONGVARCHAR
  • *
* * @return the value of extTxt */ @ThriftField(value=10) @JsonProperty("extTxt") public String getExtTxt(){ return extTxt; } /** * Setter method for {@link #extTxt}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value to be assigned to extTxt */ @ThriftField(name="extTxt") @JsonProperty("extTxt") public void setExtTxt(String newVal) { modified |= FL_PERMIT_ID_EXT_TXT_MASK; initialized |= FL_PERMIT_ID_EXT_TXT_MASK; if (Objects.equals(newVal, extTxt)) { return; } extTxt = newVal; } /** * Determines if the extTxt has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkExtTxtModified() { return 0 != (modified & FL_PERMIT_ID_EXT_TXT_MASK); } /** * Determines if the extTxt has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkExtTxtInitialized() { return 0 != (initialized & FL_PERMIT_ID_EXT_TXT_MASK); } /** * Getter method for {@link #createTime}.
* Meta Data Information (in progress): *
    *
  • full name: fl_permit.create_time
  • *
  • default value: 'CURRENT_TIMESTAMP'
  • *
  • NOT NULL
  • *
  • column size: 19
  • *
  • JDBC type returned by the driver: Types.TIMESTAMP
  • *
* * @return the value of createTime */ @JsonIgnore public java.util.Date getCreateTime(){ return createTime; } /** * use Long to represent date type for thrift:swift support * @see #getCreateTime() */ @ThriftField(value=11,name="createTime") @JsonProperty("createTime") public Long readCreateTime(){ return null == createTime ? null:createTime.getTime(); } /** * Setter method for {@link #createTime}.
* The new value is set only if equals() says it is different, * or if one of either the new value or the current value is null. * In case the new value is different, it is set and the field is marked as 'modified'. * * @param newVal the new value( NOT NULL) to be assigned to createTime */ @JsonIgnore public void setCreateTime(java.util.Date newVal) { modified |= FL_PERMIT_ID_CREATE_TIME_MASK; initialized |= FL_PERMIT_ID_CREATE_TIME_MASK; if (Objects.equals(newVal, createTime)) { return; } createTime = newVal; } /** * setter for thrift:swift OR jackson support
* without modification for {@link #modified} and {@link #initialized}
* NOTE:DO NOT use the method in your code */ @ThriftField(name="createTime") @JsonProperty("createTime") public void writeCreateTime(Long newVal){ setCreateTime(null == newVal?null:new java.util.Date(newVal)); } /** * Setter method for {@link #createTime}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to createTime */ @JsonIgnore public void setCreateTime(long newVal) { setCreateTime(new java.util.Date(newVal)); } /** * Setter method for {@link #createTime}.
* @param newVal the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object. */ @JsonIgnore public void setCreateTime(Long newVal) { setCreateTime(null == newVal ? null : new java.util.Date(newVal)); } /** * Determines if the createTime has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkCreateTimeModified() { return 0 != (modified & FL_PERMIT_ID_CREATE_TIME_MASK); } /** * Determines if the createTime has been initialized.
* * It is useful to determine if a field is null on purpose or just because it has not been initialized. * * @return true if the field has been initialized, false otherwise */ public boolean checkCreateTimeInitialized() { return 0 != (initialized & FL_PERMIT_ID_CREATE_TIME_MASK); } @Override public boolean beModified() { return 0 != modified; } @Override public boolean isModified(int columnID){ return columnID>=0 && columnID < metaData.columnCount && 0 != (modified & (1 << columnID)); } @Override public boolean isInitialized(int columnID){ return columnID>=0 && columnID < metaData.columnCount && 0 != (initialized & (1 << columnID)); } @Override public void resetIsModified() { modified = 0; } @Override public void resetPrimaryKeysModified() { modified &= (~(FL_PERMIT_ID_DEVICE_GROUP_ID_MASK | FL_PERMIT_ID_PERSON_GROUP_ID_MASK)); } /** * Resets columns modification status except primary keys to 'not modified'. */ public void resetModifiedExceptPrimaryKeys() { modified &= (~(FL_PERMIT_ID_SCHEDULE_MASK | FL_PERMIT_ID_PASS_LIMIT_MASK | FL_PERMIT_ID_REMARK_MASK | FL_PERMIT_ID_EXT_BIN_MASK | FL_PERMIT_ID_EXT_TXT_MASK | FL_PERMIT_ID_CREATE_TIME_MASK)); } /** reset all fields to initial value, equal to a new bean */ public void reset(){ this.deviceGroupId = null; this.personGroupId = null; this.schedule = null; this.passLimit = null; this.remark = null; this.extBin = null; this.extTxt = null; /* DEFAULT:'CURRENT_TIMESTAMP'*/ this.createTime = null; this.isNew = true; this.modified = 0; this.initialized = 0; } @Override public PermitBean clone(){ return (PermitBean) super.clone(); } public static final Builder builder(){ return new Builder().reset(); } /** * a builder for PermitBean,the template instance is thread local variable * a instance of Builder can be reused. */ public static final class Builder{ /** PermitBean instance used for template to create new PermitBean instance. */ static final ThreadLocal TEMPLATE = new ThreadLocal(){ @Override protected PermitBean initialValue() { return new PermitBean(); }}; private Builder() {} /** * reset the bean as template * @see PermitBean#reset() */ public Builder reset(){ TEMPLATE.get().reset(); return this; } /** set a bean as template,must not be {@code null} */ public Builder template(PermitBean bean){ if(null == bean){ throw new NullPointerException(); } TEMPLATE.set(bean); return this; } /** return a clone instance of {@link #TEMPLATE}*/ public PermitBean build(){ return TEMPLATE.get().clone(); } /** * fill the field : fl_permit.device_group_id * @param deviceGroupId 外键,设备组id * @see PermitBean#getDeviceGroupId() * @see PermitBean#setDeviceGroupId(Integer) */ public Builder deviceGroupId(Integer deviceGroupId){ TEMPLATE.get().setDeviceGroupId(deviceGroupId); return this; } /** * fill the field : fl_permit.person_group_id * @param personGroupId 外键,人员组id * @see PermitBean#getPersonGroupId() * @see PermitBean#setPersonGroupId(Integer) */ public Builder personGroupId(Integer personGroupId){ TEMPLATE.get().setPersonGroupId(personGroupId); return this; } /** * fill the field : fl_permit.schedule * @param schedule 允许通行时间表,为null或空为7x24小时工作,格式为JSON,参见开发手册 * @see PermitBean#getSchedule() * @see PermitBean#setSchedule(String) */ public Builder schedule(String schedule){ TEMPLATE.get().setSchedule(schedule); return this; } /** * fill the field : fl_permit.pass_limit * @param passLimit 通行次/天数限制定义,为null或空不限制,JSON格式字符串,参见开发手册 * @see PermitBean#getPassLimit() * @see PermitBean#setPassLimit(String) */ public Builder passLimit(String passLimit){ TEMPLATE.get().setPassLimit(passLimit); return this; } /** * fill the field : fl_permit.remark * @param remark 备注 * @see PermitBean#getRemark() * @see PermitBean#setRemark(String) */ public Builder remark(String remark){ TEMPLATE.get().setRemark(remark); return this; } /** * fill the field : fl_permit.ext_bin * @param extBin 应用项目自定义二进制扩展字段(最大64KB) * @see PermitBean#getExtBin() * @see PermitBean#setExtBin(java.nio.ByteBuffer) */ public Builder extBin(java.nio.ByteBuffer extBin){ TEMPLATE.get().setExtBin(extBin); return this; } /** * fill the field : fl_permit.ext_txt * @param extTxt 应用项目自定义文本扩展字段(最大64KB) * @see PermitBean#getExtTxt() * @see PermitBean#setExtTxt(String) */ public Builder extTxt(String extTxt){ TEMPLATE.get().setExtTxt(extTxt); return this; } /** * fill the field : fl_permit.create_time * @param createTime * @see PermitBean#getCreateTime() * @see PermitBean#setCreateTime(java.util.Date) */ public Builder createTime(java.util.Date createTime){ TEMPLATE.get().setCreateTime(createTime); return this; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy