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

net.gdface.facelog.db.FeatureBean 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;
/**
 * FeatureBean is a mapping of fl_feature Table.
 * 
Meta Data Information (in progress): *
    *
  • comments: 用于验证身份的人脸特征数据表
  • *
* @author guyadong */ @ThriftStruct @ApiModel(description="用于验证身份的人脸特征数据表") public final class FeatureBean extends BaseRow implements Serializable,Constant { private static final long serialVersionUID = -2191238184879882524L; /** comments:主键,特征码md5校验码 */ @ApiModelProperty(value = "主键,特征码md5校验码" ,required=true ,dataType="String") @CodegenLength(value=32,prealloc=true)@CodegenRequired@CodegenInvalidValue private String md5; /** comments:特征码(算法)版本号,用于区分不同人脸识别算法生成的特征数据(允许字母,数字,-,.,_符号) */ @ApiModelProperty(value = "特征码(算法)版本号,用于区分不同人脸识别算法生成的特征数据(允许字母,数字,-,.,_符号)" ,required=true ,dataType="String") @CodegenLength(max=32,prealloc=true)@CodegenRequired@CodegenInvalidValue private String version; /** comments:外键,所属用户id */ @ApiModelProperty(value = "外键,所属用户id" ,dataType="Integer") @CodegenInvalidValue("0") private Integer personId; /** comments:二进制特征数据 */ @ApiModelProperty(value = "二进制特征数据" ,required=true ,dataType="ByteBuffer") @CodegenLength(max=65535)@CodegenRequired@CodegenInvalidValue private java.nio.ByteBuffer feature; @ApiModelProperty(value = "update_time" ,dataType="Date") @CodegenInvalidValue("0") private java.util.Date updateTime; /** 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 FeatureBean(){ reset(); } /** * construct a new instance filled with primary keys * @param md5 PK# 1 */ public FeatureBean(String md5){ setMd5(md5); } /** * Getter method for {@link #md5}.
* PRIMARY KEY.
* Meta Data Information (in progress): *
    *
  • full name: fl_feature.md5
  • *
  • imported key: fl_log.verify_feature
  • *
  • imported key: fl_face.feature_md5
  • *
  • comments: 主键,特征码md5校验码
  • *
  • NOT NULL
  • *
  • column size: 32
  • *
  • JDBC type returned by the driver: Types.CHAR
  • *
* * @return the value of md5 */ @ThriftField(value=4) @JsonProperty("md5") public String getMd5(){ return md5; } /** * Setter method for {@link #md5}.
* 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 md5 */ @ThriftField(name="md5") @JsonProperty("md5") public void setMd5(String newVal) { modified |= FL_FEATURE_ID_MD5_MASK; initialized |= FL_FEATURE_ID_MD5_MASK; if (Objects.equals(newVal, md5)) { return; } md5 = newVal; } /** * Determines if the md5 has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkMd5Modified() { return 0 != (modified & FL_FEATURE_ID_MD5_MASK); } /** * Determines if the md5 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 checkMd5Initialized() { return 0 != (initialized & FL_FEATURE_ID_MD5_MASK); } /** * Getter method for {@link #version}.
* Meta Data Information (in progress): *
    *
  • full name: fl_feature.version
  • *
  • comments: 特征码(算法)版本号,用于区分不同人脸识别算法生成的特征数据(允许字母,数字,-,.,_符号)
  • *
  • NOT NULL
  • *
  • column size: 32
  • *
  • JDBC type returned by the driver: Types.VARCHAR
  • *
* * @return the value of version */ @ThriftField(value=5) @JsonProperty("version") public String getVersion(){ return version; } /** * Setter method for {@link #version}.
* 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 version */ @ThriftField(name="version") @JsonProperty("version") public void setVersion(String newVal) { modified |= FL_FEATURE_ID_VERSION_MASK; initialized |= FL_FEATURE_ID_VERSION_MASK; if (Objects.equals(newVal, version)) { return; } version = newVal; } /** * Determines if the version has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkVersionModified() { return 0 != (modified & FL_FEATURE_ID_VERSION_MASK); } /** * Determines if the version 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 checkVersionInitialized() { return 0 != (initialized & FL_FEATURE_ID_VERSION_MASK); } /** * Getter method for {@link #personId}.
* Meta Data Information (in progress): *
    *
  • full name: fl_feature.person_id
  • *
  • foreign key: fl_person.id
  • *
  • comments: 外键,所属用户id
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of personId */ @ThriftField(value=6) @JsonProperty("personId") public Integer getPersonId(){ return personId; } /** * Setter method for {@link #personId}.
* 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 personId */ @ThriftField(name="personId") @JsonProperty("personId") public void setPersonId(Integer newVal) { modified |= FL_FEATURE_ID_PERSON_ID_MASK; initialized |= FL_FEATURE_ID_PERSON_ID_MASK; if (Objects.equals(newVal, personId)) { return; } personId = newVal; } /** * Setter method for {@link #personId}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to personId */ @JsonIgnore public void setPersonId(int newVal) { setPersonId(new Integer(newVal)); } /** * Determines if the personId has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkPersonIdModified() { return 0 != (modified & FL_FEATURE_ID_PERSON_ID_MASK); } /** * Determines if the personId 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 checkPersonIdInitialized() { return 0 != (initialized & FL_FEATURE_ID_PERSON_ID_MASK); } /** * Getter method for {@link #feature}.
* Meta Data Information (in progress): *
    *
  • full name: fl_feature.feature
  • *
  • comments: 二进制特征数据
  • *
  • NOT NULL
  • *
  • column size: 65535
  • *
  • JDBC type returned by the driver: Types.LONGVARBINARY
  • *
* * @return the value of feature */ @ThriftField(value=7) @JsonProperty("feature") public java.nio.ByteBuffer getFeature(){ return feature; } /** * Setter method for {@link #feature}.
* 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 feature */ @ThriftField(name="feature") @JsonProperty("feature") public void setFeature(java.nio.ByteBuffer newVal) { modified |= FL_FEATURE_ID_FEATURE_MASK; initialized |= FL_FEATURE_ID_FEATURE_MASK; if (Objects.equals(newVal, feature)) { return; } feature = newVal; } /** * Determines if the feature has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkFeatureModified() { return 0 != (modified & FL_FEATURE_ID_FEATURE_MASK); } /** * Determines if the feature 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 checkFeatureInitialized() { return 0 != (initialized & FL_FEATURE_ID_FEATURE_MASK); } /** * Getter method for {@link #updateTime}.
* Meta Data Information (in progress): *
    *
  • full name: fl_feature.update_time
  • *
  • default value: 'CURRENT_TIMESTAMP'
  • *
  • NOT NULL
  • *
  • column size: 19
  • *
  • JDBC type returned by the driver: Types.TIMESTAMP
  • *
* * @return the value of updateTime */ @JsonIgnore public java.util.Date getUpdateTime(){ return updateTime; } /** * use Long to represent date type for thrift:swift support * @see #getUpdateTime() */ @ThriftField(value=8,name="updateTime") @JsonProperty("updateTime") public Long readUpdateTime(){ return null == updateTime ? null:updateTime.getTime(); } /** * Setter method for {@link #updateTime}.
* 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 updateTime */ @JsonIgnore public void setUpdateTime(java.util.Date newVal) { modified |= FL_FEATURE_ID_UPDATE_TIME_MASK; initialized |= FL_FEATURE_ID_UPDATE_TIME_MASK; if (Objects.equals(newVal, updateTime)) { return; } updateTime = 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="updateTime") @JsonProperty("updateTime") public void writeUpdateTime(Long newVal){ setUpdateTime(null == newVal?null:new java.util.Date(newVal)); } /** * Setter method for {@link #updateTime}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to updateTime */ @JsonIgnore public void setUpdateTime(long newVal) { setUpdateTime(new java.util.Date(newVal)); } /** * Setter method for {@link #updateTime}.
* @param newVal the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object. */ @JsonIgnore public void setUpdateTime(Long newVal) { setUpdateTime(null == newVal ? null : new java.util.Date(newVal)); } /** * Determines if the updateTime has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkUpdateTimeModified() { return 0 != (modified & FL_FEATURE_ID_UPDATE_TIME_MASK); } /** * Determines if the updateTime 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 checkUpdateTimeInitialized() { return 0 != (initialized & FL_FEATURE_ID_UPDATE_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_FEATURE_ID_MD5_MASK)); } /** * Resets columns modification status except primary keys to 'not modified'. */ public void resetModifiedExceptPrimaryKeys() { modified &= (~(FL_FEATURE_ID_VERSION_MASK | FL_FEATURE_ID_PERSON_ID_MASK | FL_FEATURE_ID_FEATURE_MASK | FL_FEATURE_ID_UPDATE_TIME_MASK)); } /** reset all fields to initial value, equal to a new bean */ public void reset(){ this.md5 = null; this.version = null; this.personId = null; this.feature = null; /* DEFAULT:'CURRENT_TIMESTAMP'*/ this.updateTime = null; this.isNew = true; this.modified = 0; this.initialized = 0; } @Override public FeatureBean clone(){ return (FeatureBean) super.clone(); } public static final Builder builder(){ return new Builder().reset(); } /** * a builder for FeatureBean,the template instance is thread local variable * a instance of Builder can be reused. */ public static final class Builder{ /** FeatureBean instance used for template to create new FeatureBean instance. */ static final ThreadLocal TEMPLATE = new ThreadLocal(){ @Override protected FeatureBean initialValue() { return new FeatureBean(); }}; private Builder() {} /** * reset the bean as template * @see FeatureBean#reset() */ public Builder reset(){ TEMPLATE.get().reset(); return this; } /** set a bean as template,must not be {@code null} */ public Builder template(FeatureBean bean){ if(null == bean){ throw new NullPointerException(); } TEMPLATE.set(bean); return this; } /** return a clone instance of {@link #TEMPLATE}*/ public FeatureBean build(){ return TEMPLATE.get().clone(); } /** * fill the field : fl_feature.md5 * @param md5 主键,特征码md5校验码 * @see FeatureBean#getMd5() * @see FeatureBean#setMd5(String) */ public Builder md5(String md5){ TEMPLATE.get().setMd5(md5); return this; } /** * fill the field : fl_feature.version * @param version 特征码(算法)版本号,用于区分不同人脸识别算法生成的特征数据(允许字母,数字,-,.,_符号) * @see FeatureBean#getVersion() * @see FeatureBean#setVersion(String) */ public Builder version(String version){ TEMPLATE.get().setVersion(version); return this; } /** * fill the field : fl_feature.person_id * @param personId 外键,所属用户id * @see FeatureBean#getPersonId() * @see FeatureBean#setPersonId(Integer) */ public Builder personId(Integer personId){ TEMPLATE.get().setPersonId(personId); return this; } /** * fill the field : fl_feature.feature * @param feature 二进制特征数据 * @see FeatureBean#getFeature() * @see FeatureBean#setFeature(java.nio.ByteBuffer) */ public Builder feature(java.nio.ByteBuffer feature){ TEMPLATE.get().setFeature(feature); return this; } /** * fill the field : fl_feature.update_time * @param updateTime * @see FeatureBean#getUpdateTime() * @see FeatureBean#setUpdateTime(java.util.Date) */ public Builder updateTime(java.util.Date updateTime){ TEMPLATE.get().setUpdateTime(updateTime); return this; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy