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

net.gdface.facedb.dborm.face.FdFaceBean Maven / Gradle / Ivy

// ______________________________________________________
// Generated by sql2java - https://github.com/10km/sql2java-2-6-7 (custom branch) 
// modified by guyadong from
// sql2java original version https://sourceforge.net/projects/sql2java/ 
// JDBC driver used at code generation time: com.mysql.jdbc.Driver
// template: bean.java.vm
// ______________________________________________________
package net.gdface.facedb.dborm.face;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;

import net.gdface.facedb.dborm.Constant;
import net.gdface.facedb.dborm.BaseBean;
import net.gdface.facedb.dborm.image.FdImageBean;
import net.gdface.facedb.dborm.CompareToBuilder;
import net.gdface.facedb.dborm.EqualsBuilder;
import net.gdface.facedb.dborm.HashCodeBuilder;
/**
 * FdFaceBean is a mapping of fd_face Table.
 * 
Meta Data Information (in progress): *
    *
  • comments: 人脸检测信息数据表,用于保存检测到的人脸的所有信息(特征数据除外)
  • *
* @author guyadong */ public class FdFaceBean implements Serializable,BaseBean,Comparable,Constant,Cloneable { private static final long serialVersionUID = -671762068015058085L; /** NULL {@link FdFaceBean} bean , IMMUTABLE instance */ public static final FdFaceBean NULL = new FdFaceBean().asNULL().asImmutable(); /** comments:主键 */ private Integer id; /** comments:外键,所属图像id */ private String imageMd5; /** comments:外键,人脸特征数据MD5 id */ private String featureMd5; private Integer faceLeft; private Integer faceTop; private Integer faceWidth; private Integer faceHeight; private Integer eyeLeftx; private Integer eyeLefty; private Integer eyeRightx; private Integer eyeRighty; private Integer mouthX; private Integer mouthY; private Integer noseX; private Integer noseY; private Integer angleYaw; private Integer anglePitch; private Integer angleRoll; private Float angleConfidence; /** comments:扩展字段,保存人脸检测基本信息之外的其他数据,内容由SDK负责解析 */ private java.nio.ByteBuffer extInfo; private java.util.Date createTime; /** flag whether {@code this} can be modified */ private Boolean immutable; /** columns modified flag */ private long modified; /** columns initialized flag */ private long initialized; private boolean isNew; /** * set immutable status * @return {@code this} */ private FdFaceBean immutable(Boolean immutable) { this.immutable = immutable; return this; } /** * set {@code this} as immutable object * @return {@code this} */ public FdFaceBean asImmutable() { return immutable(Boolean.TRUE); } /** * @return {@code true} if {@code this} is a mutable object */ public boolean mutable(){ return !Boolean.TRUE.equals(this.immutable); } /** * @return {@code this} * @throws IllegalStateException if {@code this} is a immutable object */ private FdFaceBean checkMutable(){ if(!mutable()){ throw new IllegalStateException("this is a immutable object"); } return this; } /** * return a new mutable copy of this object. * @return */ public FdFaceBean cloneMutable(){ return clone().immutable(null); } @Override public boolean isNew() { return this.isNew; } @Override public void isNew(boolean isNew) { this.isNew = isNew; } /** * Specifies to the object if it has been set as new. * * @param isNew the boolean value to be assigned to the isNew field */ public void setNew(boolean isNew) { this.isNew = isNew; } /** * @return the modified status of columns */ public long getModified(){ return modified; } /** * @param modified the modified status bit to be assigned to {@link #modified} */ public void setModified(long modified){ this.modified = modified; } /** * @return the initialized status of columns */ public long getInitialized(){ return initialized; } /** * @param initialized the initialized status bit to be assigned to {@link #initialized} */ public void setInitialized(long initialized){ this.initialized = initialized; } protected static final >boolean equals(T a, T b) { return a == b || (a != null && 0==a.compareTo(b)); } public FdFaceBean(){ super(); reset(); } /** * construct a new instance filled with primary keys * @param id PK# 1 */ public FdFaceBean(Integer id){ this(); setId(id); } /** * Getter method for {@link #id}.
* PRIMARY KEY.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.id
  • *
  • comments: 主键
  • *
  • AUTO_INCREMENT
  • *
  • NOT NULL
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of id */ public Integer getId(){ return id; } /** * Setter method for {@link #id}.
* 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 id */ public void setId(Integer newVal) { checkMutable(); if (Objects.equals(newVal, id)) { return; } id = newVal; modified |= FD_FACE_ID_ID_MASK; initialized |= FD_FACE_ID_ID_MASK; } /** * Setter method for {@link #id}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to id */ public void setId(int newVal) { setId(new Integer(newVal)); } /** * Determines if the id has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkIdModified() { return 0L != (modified & FD_FACE_ID_ID_MASK); } /** * Determines if the id 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 checkIdInitialized() { return 0L != (initialized & FD_FACE_ID_ID_MASK); } /** * Getter method for {@link #imageMd5}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.image_md5
  • *
  • foreign key: fd_image.md5
  • *
  • comments: 外键,所属图像id
  • *
  • NOT NULL
  • *
  • column size: 32
  • *
  • JDBC type returned by the driver: Types.CHAR
  • *
* * @return the value of imageMd5 */ public String getImageMd5(){ return imageMd5; } /** * Setter method for {@link #imageMd5}.
* 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 imageMd5 */ public void setImageMd5(String newVal) { checkMutable(); if (Objects.equals(newVal, imageMd5)) { return; } imageMd5 = newVal; modified |= FD_FACE_ID_IMAGE_MD5_MASK; initialized |= FD_FACE_ID_IMAGE_MD5_MASK; } /** * Determines if the imageMd5 has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkImageMd5Modified() { return 0L != (modified & FD_FACE_ID_IMAGE_MD5_MASK); } /** * Determines if the imageMd5 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 checkImageMd5Initialized() { return 0L != (initialized & FD_FACE_ID_IMAGE_MD5_MASK); } /** * Getter method for {@link #featureMd5}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.feature_md5
  • *
  • foreign key: fd_feature.md5
  • *
  • comments: 外键,人脸特征数据MD5 id
  • *
  • column size: 32
  • *
  • JDBC type returned by the driver: Types.CHAR
  • *
* * @return the value of featureMd5 */ public String getFeatureMd5(){ return featureMd5; } /** * Setter method for {@link #featureMd5}.
* 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 featureMd5 */ public void setFeatureMd5(String newVal) { checkMutable(); if (Objects.equals(newVal, featureMd5)) { return; } featureMd5 = newVal; modified |= FD_FACE_ID_FEATURE_MD5_MASK; initialized |= FD_FACE_ID_FEATURE_MD5_MASK; } /** * Determines if the featureMd5 has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkFeatureMd5Modified() { return 0L != (modified & FD_FACE_ID_FEATURE_MD5_MASK); } /** * Determines if the featureMd5 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 checkFeatureMd5Initialized() { return 0L != (initialized & FD_FACE_ID_FEATURE_MD5_MASK); } /** * Getter method for {@link #faceLeft}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.face_left
  • *
  • NOT NULL
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of faceLeft */ public Integer getFaceLeft(){ return faceLeft; } /** * Setter method for {@link #faceLeft}.
* 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 faceLeft */ public void setFaceLeft(Integer newVal) { checkMutable(); if (Objects.equals(newVal, faceLeft)) { return; } faceLeft = newVal; modified |= FD_FACE_ID_FACE_LEFT_MASK; initialized |= FD_FACE_ID_FACE_LEFT_MASK; } /** * Setter method for {@link #faceLeft}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to faceLeft */ public void setFaceLeft(int newVal) { setFaceLeft(new Integer(newVal)); } /** * Determines if the faceLeft has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkFaceLeftModified() { return 0L != (modified & FD_FACE_ID_FACE_LEFT_MASK); } /** * Determines if the faceLeft 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 checkFaceLeftInitialized() { return 0L != (initialized & FD_FACE_ID_FACE_LEFT_MASK); } /** * Getter method for {@link #faceTop}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.face_top
  • *
  • NOT NULL
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of faceTop */ public Integer getFaceTop(){ return faceTop; } /** * Setter method for {@link #faceTop}.
* 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 faceTop */ public void setFaceTop(Integer newVal) { checkMutable(); if (Objects.equals(newVal, faceTop)) { return; } faceTop = newVal; modified |= FD_FACE_ID_FACE_TOP_MASK; initialized |= FD_FACE_ID_FACE_TOP_MASK; } /** * Setter method for {@link #faceTop}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to faceTop */ public void setFaceTop(int newVal) { setFaceTop(new Integer(newVal)); } /** * Determines if the faceTop has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkFaceTopModified() { return 0L != (modified & FD_FACE_ID_FACE_TOP_MASK); } /** * Determines if the faceTop 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 checkFaceTopInitialized() { return 0L != (initialized & FD_FACE_ID_FACE_TOP_MASK); } /** * Getter method for {@link #faceWidth}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.face_width
  • *
  • NOT NULL
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of faceWidth */ public Integer getFaceWidth(){ return faceWidth; } /** * Setter method for {@link #faceWidth}.
* 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 faceWidth */ public void setFaceWidth(Integer newVal) { checkMutable(); if (Objects.equals(newVal, faceWidth)) { return; } faceWidth = newVal; modified |= FD_FACE_ID_FACE_WIDTH_MASK; initialized |= FD_FACE_ID_FACE_WIDTH_MASK; } /** * Setter method for {@link #faceWidth}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to faceWidth */ public void setFaceWidth(int newVal) { setFaceWidth(new Integer(newVal)); } /** * Determines if the faceWidth has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkFaceWidthModified() { return 0L != (modified & FD_FACE_ID_FACE_WIDTH_MASK); } /** * Determines if the faceWidth 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 checkFaceWidthInitialized() { return 0L != (initialized & FD_FACE_ID_FACE_WIDTH_MASK); } /** * Getter method for {@link #faceHeight}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.face_height
  • *
  • NOT NULL
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of faceHeight */ public Integer getFaceHeight(){ return faceHeight; } /** * Setter method for {@link #faceHeight}.
* 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 faceHeight */ public void setFaceHeight(Integer newVal) { checkMutable(); if (Objects.equals(newVal, faceHeight)) { return; } faceHeight = newVal; modified |= FD_FACE_ID_FACE_HEIGHT_MASK; initialized |= FD_FACE_ID_FACE_HEIGHT_MASK; } /** * Setter method for {@link #faceHeight}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to faceHeight */ public void setFaceHeight(int newVal) { setFaceHeight(new Integer(newVal)); } /** * Determines if the faceHeight has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkFaceHeightModified() { return 0L != (modified & FD_FACE_ID_FACE_HEIGHT_MASK); } /** * Determines if the faceHeight 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 checkFaceHeightInitialized() { return 0L != (initialized & FD_FACE_ID_FACE_HEIGHT_MASK); } /** * Getter method for {@link #eyeLeftx}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.eye_leftx
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of eyeLeftx */ public Integer getEyeLeftx(){ return eyeLeftx; } /** * Setter method for {@link #eyeLeftx}.
* 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 eyeLeftx */ public void setEyeLeftx(Integer newVal) { checkMutable(); if (Objects.equals(newVal, eyeLeftx)) { return; } eyeLeftx = newVal; modified |= FD_FACE_ID_EYE_LEFTX_MASK; initialized |= FD_FACE_ID_EYE_LEFTX_MASK; } /** * Setter method for {@link #eyeLeftx}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to eyeLeftx */ public void setEyeLeftx(int newVal) { setEyeLeftx(new Integer(newVal)); } /** * Determines if the eyeLeftx has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkEyeLeftxModified() { return 0L != (modified & FD_FACE_ID_EYE_LEFTX_MASK); } /** * Determines if the eyeLeftx 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 checkEyeLeftxInitialized() { return 0L != (initialized & FD_FACE_ID_EYE_LEFTX_MASK); } /** * Getter method for {@link #eyeLefty}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.eye_lefty
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of eyeLefty */ public Integer getEyeLefty(){ return eyeLefty; } /** * Setter method for {@link #eyeLefty}.
* 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 eyeLefty */ public void setEyeLefty(Integer newVal) { checkMutable(); if (Objects.equals(newVal, eyeLefty)) { return; } eyeLefty = newVal; modified |= FD_FACE_ID_EYE_LEFTY_MASK; initialized |= FD_FACE_ID_EYE_LEFTY_MASK; } /** * Setter method for {@link #eyeLefty}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to eyeLefty */ public void setEyeLefty(int newVal) { setEyeLefty(new Integer(newVal)); } /** * Determines if the eyeLefty has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkEyeLeftyModified() { return 0L != (modified & FD_FACE_ID_EYE_LEFTY_MASK); } /** * Determines if the eyeLefty 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 checkEyeLeftyInitialized() { return 0L != (initialized & FD_FACE_ID_EYE_LEFTY_MASK); } /** * Getter method for {@link #eyeRightx}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.eye_rightx
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of eyeRightx */ public Integer getEyeRightx(){ return eyeRightx; } /** * Setter method for {@link #eyeRightx}.
* 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 eyeRightx */ public void setEyeRightx(Integer newVal) { checkMutable(); if (Objects.equals(newVal, eyeRightx)) { return; } eyeRightx = newVal; modified |= FD_FACE_ID_EYE_RIGHTX_MASK; initialized |= FD_FACE_ID_EYE_RIGHTX_MASK; } /** * Setter method for {@link #eyeRightx}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to eyeRightx */ public void setEyeRightx(int newVal) { setEyeRightx(new Integer(newVal)); } /** * Determines if the eyeRightx has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkEyeRightxModified() { return 0L != (modified & FD_FACE_ID_EYE_RIGHTX_MASK); } /** * Determines if the eyeRightx 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 checkEyeRightxInitialized() { return 0L != (initialized & FD_FACE_ID_EYE_RIGHTX_MASK); } /** * Getter method for {@link #eyeRighty}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.eye_righty
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of eyeRighty */ public Integer getEyeRighty(){ return eyeRighty; } /** * Setter method for {@link #eyeRighty}.
* 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 eyeRighty */ public void setEyeRighty(Integer newVal) { checkMutable(); if (Objects.equals(newVal, eyeRighty)) { return; } eyeRighty = newVal; modified |= FD_FACE_ID_EYE_RIGHTY_MASK; initialized |= FD_FACE_ID_EYE_RIGHTY_MASK; } /** * Setter method for {@link #eyeRighty}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to eyeRighty */ public void setEyeRighty(int newVal) { setEyeRighty(new Integer(newVal)); } /** * Determines if the eyeRighty has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkEyeRightyModified() { return 0L != (modified & FD_FACE_ID_EYE_RIGHTY_MASK); } /** * Determines if the eyeRighty 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 checkEyeRightyInitialized() { return 0L != (initialized & FD_FACE_ID_EYE_RIGHTY_MASK); } /** * Getter method for {@link #mouthX}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.mouth_x
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of mouthX */ public Integer getMouthX(){ return mouthX; } /** * Setter method for {@link #mouthX}.
* 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 mouthX */ public void setMouthX(Integer newVal) { checkMutable(); if (Objects.equals(newVal, mouthX)) { return; } mouthX = newVal; modified |= FD_FACE_ID_MOUTH_X_MASK; initialized |= FD_FACE_ID_MOUTH_X_MASK; } /** * Setter method for {@link #mouthX}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to mouthX */ public void setMouthX(int newVal) { setMouthX(new Integer(newVal)); } /** * Determines if the mouthX has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkMouthXModified() { return 0L != (modified & FD_FACE_ID_MOUTH_X_MASK); } /** * Determines if the mouthX 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 checkMouthXInitialized() { return 0L != (initialized & FD_FACE_ID_MOUTH_X_MASK); } /** * Getter method for {@link #mouthY}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.mouth_y
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of mouthY */ public Integer getMouthY(){ return mouthY; } /** * Setter method for {@link #mouthY}.
* 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 mouthY */ public void setMouthY(Integer newVal) { checkMutable(); if (Objects.equals(newVal, mouthY)) { return; } mouthY = newVal; modified |= FD_FACE_ID_MOUTH_Y_MASK; initialized |= FD_FACE_ID_MOUTH_Y_MASK; } /** * Setter method for {@link #mouthY}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to mouthY */ public void setMouthY(int newVal) { setMouthY(new Integer(newVal)); } /** * Determines if the mouthY has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkMouthYModified() { return 0L != (modified & FD_FACE_ID_MOUTH_Y_MASK); } /** * Determines if the mouthY 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 checkMouthYInitialized() { return 0L != (initialized & FD_FACE_ID_MOUTH_Y_MASK); } /** * Getter method for {@link #noseX}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.nose_x
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of noseX */ public Integer getNoseX(){ return noseX; } /** * Setter method for {@link #noseX}.
* 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 noseX */ public void setNoseX(Integer newVal) { checkMutable(); if (Objects.equals(newVal, noseX)) { return; } noseX = newVal; modified |= FD_FACE_ID_NOSE_X_MASK; initialized |= FD_FACE_ID_NOSE_X_MASK; } /** * Setter method for {@link #noseX}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to noseX */ public void setNoseX(int newVal) { setNoseX(new Integer(newVal)); } /** * Determines if the noseX has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkNoseXModified() { return 0L != (modified & FD_FACE_ID_NOSE_X_MASK); } /** * Determines if the noseX 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 checkNoseXInitialized() { return 0L != (initialized & FD_FACE_ID_NOSE_X_MASK); } /** * Getter method for {@link #noseY}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.nose_y
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of noseY */ public Integer getNoseY(){ return noseY; } /** * Setter method for {@link #noseY}.
* 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 noseY */ public void setNoseY(Integer newVal) { checkMutable(); if (Objects.equals(newVal, noseY)) { return; } noseY = newVal; modified |= FD_FACE_ID_NOSE_Y_MASK; initialized |= FD_FACE_ID_NOSE_Y_MASK; } /** * Setter method for {@link #noseY}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to noseY */ public void setNoseY(int newVal) { setNoseY(new Integer(newVal)); } /** * Determines if the noseY has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkNoseYModified() { return 0L != (modified & FD_FACE_ID_NOSE_Y_MASK); } /** * Determines if the noseY 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 checkNoseYInitialized() { return 0L != (initialized & FD_FACE_ID_NOSE_Y_MASK); } /** * Getter method for {@link #angleYaw}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.angle_yaw
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of angleYaw */ public Integer getAngleYaw(){ return angleYaw; } /** * Setter method for {@link #angleYaw}.
* 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 angleYaw */ public void setAngleYaw(Integer newVal) { checkMutable(); if (Objects.equals(newVal, angleYaw)) { return; } angleYaw = newVal; modified |= FD_FACE_ID_ANGLE_YAW_MASK; initialized |= FD_FACE_ID_ANGLE_YAW_MASK; } /** * Setter method for {@link #angleYaw}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to angleYaw */ public void setAngleYaw(int newVal) { setAngleYaw(new Integer(newVal)); } /** * Determines if the angleYaw has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkAngleYawModified() { return 0L != (modified & FD_FACE_ID_ANGLE_YAW_MASK); } /** * Determines if the angleYaw 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 checkAngleYawInitialized() { return 0L != (initialized & FD_FACE_ID_ANGLE_YAW_MASK); } /** * Getter method for {@link #anglePitch}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.angle_pitch
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of anglePitch */ public Integer getAnglePitch(){ return anglePitch; } /** * Setter method for {@link #anglePitch}.
* 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 anglePitch */ public void setAnglePitch(Integer newVal) { checkMutable(); if (Objects.equals(newVal, anglePitch)) { return; } anglePitch = newVal; modified |= FD_FACE_ID_ANGLE_PITCH_MASK; initialized |= FD_FACE_ID_ANGLE_PITCH_MASK; } /** * Setter method for {@link #anglePitch}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to anglePitch */ public void setAnglePitch(int newVal) { setAnglePitch(new Integer(newVal)); } /** * Determines if the anglePitch has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkAnglePitchModified() { return 0L != (modified & FD_FACE_ID_ANGLE_PITCH_MASK); } /** * Determines if the anglePitch 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 checkAnglePitchInitialized() { return 0L != (initialized & FD_FACE_ID_ANGLE_PITCH_MASK); } /** * Getter method for {@link #angleRoll}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.angle_roll
  • *
  • column size: 10
  • *
  • JDBC type returned by the driver: Types.INTEGER
  • *
* * @return the value of angleRoll */ public Integer getAngleRoll(){ return angleRoll; } /** * Setter method for {@link #angleRoll}.
* 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 angleRoll */ public void setAngleRoll(Integer newVal) { checkMutable(); if (Objects.equals(newVal, angleRoll)) { return; } angleRoll = newVal; modified |= FD_FACE_ID_ANGLE_ROLL_MASK; initialized |= FD_FACE_ID_ANGLE_ROLL_MASK; } /** * Setter method for {@link #angleRoll}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to angleRoll */ public void setAngleRoll(int newVal) { setAngleRoll(new Integer(newVal)); } /** * Determines if the angleRoll has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkAngleRollModified() { return 0L != (modified & FD_FACE_ID_ANGLE_ROLL_MASK); } /** * Determines if the angleRoll 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 checkAngleRollInitialized() { return 0L != (initialized & FD_FACE_ID_ANGLE_ROLL_MASK); } /** * Getter method for {@link #angleConfidence}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.angle_confidence
  • *
  • column size: 12
  • *
  • JDBC type returned by the driver: Types.REAL
  • *
* * @return the value of angleConfidence */ public Float getAngleConfidence(){ return angleConfidence; } /** * Setter method for {@link #angleConfidence}.
* 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 angleConfidence */ public void setAngleConfidence(Float newVal) { checkMutable(); if (Objects.equals(newVal, angleConfidence)) { return; } angleConfidence = newVal; modified |= FD_FACE_ID_ANGLE_CONFIDENCE_MASK; initialized |= FD_FACE_ID_ANGLE_CONFIDENCE_MASK; } /** * Setter method for {@link #angleConfidence}.
* Convenient for those who do not want to deal with Objects for primary types. * * @param newVal the new value to be assigned to angleConfidence */ public void setAngleConfidence(float newVal) { setAngleConfidence(new Float(newVal)); } /** * Determines if the angleConfidence has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkAngleConfidenceModified() { return 0L != (modified & FD_FACE_ID_ANGLE_CONFIDENCE_MASK); } /** * Determines if the angleConfidence 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 checkAngleConfidenceInitialized() { return 0L != (initialized & FD_FACE_ID_ANGLE_CONFIDENCE_MASK); } /** * Getter method for {@link #extInfo}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.ext_info
  • *
  • comments: 扩展字段,保存人脸检测基本信息之外的其他数据,内容由SDK负责解析
  • *
  • column size: 65535
  • *
  • JDBC type returned by the driver: Types.LONGVARBINARY
  • *
* * @return the value of extInfo */ public java.nio.ByteBuffer getExtInfo(){ return extInfo; } /** * Setter method for {@link #extInfo}.
* 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 extInfo */ public void setExtInfo(java.nio.ByteBuffer newVal) { checkMutable(); if (Objects.equals(newVal, extInfo)) { return; } extInfo = newVal; modified |= FD_FACE_ID_EXT_INFO_MASK; initialized |= FD_FACE_ID_EXT_INFO_MASK; } /** * Determines if the extInfo has been modified. * * @return true if the field has been modified, false if the field has not been modified */ public boolean checkExtInfoModified() { return 0L != (modified & FD_FACE_ID_EXT_INFO_MASK); } /** * Determines if the extInfo 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 checkExtInfoInitialized() { return 0L != (initialized & FD_FACE_ID_EXT_INFO_MASK); } /** * Getter method for {@link #createTime}.
* Meta Data Information (in progress): *
    *
  • full name: fd_face.create_time
  • *
  • default value: 'CURRENT_TIMESTAMP'
  • *
  • NOT NULL
  • *
  • column size: 19
  • *
  • JDBC type returned by the driver: Types.TIMESTAMP
  • *
* * @return the value of createTime */ public java.util.Date getCreateTime(){ return createTime; } /** * 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 */ public void setCreateTime(java.util.Date newVal) { checkMutable(); if (Objects.equals(newVal, createTime)) { return; } createTime = newVal; modified |= FD_FACE_ID_CREATE_TIME_MASK; initialized |= FD_FACE_ID_CREATE_TIME_MASK; } /** * 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 */ 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. */ 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 0L != (modified & FD_FACE_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 0L != (initialized & FD_FACE_ID_CREATE_TIME_MASK); } ////////////////////////////////////// // referenced bean for FOREIGN KEYS ////////////////////////////////////// /** * The referenced {@link FdFeatureBean} by {@link #featureMd5} .
* FOREIGN KEY (feature_md5) REFERENCES fd_feature(md5) */ private FdFeatureBean referencedByFeatureMd5; /** Getter method for {@link #referencedByFeatureMd5}. */ public FdFeatureBean getReferencedByFeatureMd5() { return this.referencedByFeatureMd5; } /** Setter method for {@link #referencedByFeatureMd5}. */ public void setReferencedByFeatureMd5(FdFeatureBean reference) { this.referencedByFeatureMd5 = reference; } /** * The referenced {@link FdImageBean} by {@link #imageMd5} .
* FOREIGN KEY (image_md5) REFERENCES fd_image(md5) */ private FdImageBean referencedByImageMd5; /** Getter method for {@link #referencedByImageMd5}. */ public FdImageBean getReferencedByImageMd5() { return this.referencedByImageMd5; } /** Setter method for {@link #referencedByImageMd5}. */ public void setReferencedByImageMd5(FdImageBean reference) { this.referencedByImageMd5 = reference; } @Override public boolean isModified() { return 0 != modified; } @Override public boolean isModified(int columnID){ switch ( columnID ){ case FD_FACE_ID_ID: return checkIdModified(); case FD_FACE_ID_IMAGE_MD5: return checkImageMd5Modified(); case FD_FACE_ID_FEATURE_MD5: return checkFeatureMd5Modified(); case FD_FACE_ID_FACE_LEFT: return checkFaceLeftModified(); case FD_FACE_ID_FACE_TOP: return checkFaceTopModified(); case FD_FACE_ID_FACE_WIDTH: return checkFaceWidthModified(); case FD_FACE_ID_FACE_HEIGHT: return checkFaceHeightModified(); case FD_FACE_ID_EYE_LEFTX: return checkEyeLeftxModified(); case FD_FACE_ID_EYE_LEFTY: return checkEyeLeftyModified(); case FD_FACE_ID_EYE_RIGHTX: return checkEyeRightxModified(); case FD_FACE_ID_EYE_RIGHTY: return checkEyeRightyModified(); case FD_FACE_ID_MOUTH_X: return checkMouthXModified(); case FD_FACE_ID_MOUTH_Y: return checkMouthYModified(); case FD_FACE_ID_NOSE_X: return checkNoseXModified(); case FD_FACE_ID_NOSE_Y: return checkNoseYModified(); case FD_FACE_ID_ANGLE_YAW: return checkAngleYawModified(); case FD_FACE_ID_ANGLE_PITCH: return checkAnglePitchModified(); case FD_FACE_ID_ANGLE_ROLL: return checkAngleRollModified(); case FD_FACE_ID_ANGLE_CONFIDENCE: return checkAngleConfidenceModified(); case FD_FACE_ID_EXT_INFO: return checkExtInfoModified(); case FD_FACE_ID_CREATE_TIME: return checkCreateTimeModified(); default: return false; } } @Override public boolean isInitialized(int columnID){ switch(columnID) { case FD_FACE_ID_ID: return checkIdInitialized(); case FD_FACE_ID_IMAGE_MD5: return checkImageMd5Initialized(); case FD_FACE_ID_FEATURE_MD5: return checkFeatureMd5Initialized(); case FD_FACE_ID_FACE_LEFT: return checkFaceLeftInitialized(); case FD_FACE_ID_FACE_TOP: return checkFaceTopInitialized(); case FD_FACE_ID_FACE_WIDTH: return checkFaceWidthInitialized(); case FD_FACE_ID_FACE_HEIGHT: return checkFaceHeightInitialized(); case FD_FACE_ID_EYE_LEFTX: return checkEyeLeftxInitialized(); case FD_FACE_ID_EYE_LEFTY: return checkEyeLeftyInitialized(); case FD_FACE_ID_EYE_RIGHTX: return checkEyeRightxInitialized(); case FD_FACE_ID_EYE_RIGHTY: return checkEyeRightyInitialized(); case FD_FACE_ID_MOUTH_X: return checkMouthXInitialized(); case FD_FACE_ID_MOUTH_Y: return checkMouthYInitialized(); case FD_FACE_ID_NOSE_X: return checkNoseXInitialized(); case FD_FACE_ID_NOSE_Y: return checkNoseYInitialized(); case FD_FACE_ID_ANGLE_YAW: return checkAngleYawInitialized(); case FD_FACE_ID_ANGLE_PITCH: return checkAnglePitchInitialized(); case FD_FACE_ID_ANGLE_ROLL: return checkAngleRollInitialized(); case FD_FACE_ID_ANGLE_CONFIDENCE: return checkAngleConfidenceInitialized(); case FD_FACE_ID_EXT_INFO: return checkExtInfoInitialized(); case FD_FACE_ID_CREATE_TIME: return checkCreateTimeInitialized(); default: return false; } } @Override public boolean isModified(String column){ return isModified(columnIDOf(column)); } @Override public boolean isInitialized(String column){ return isInitialized(columnIDOf(column)); } @Override public void resetIsModified() { checkMutable(); modified = 0L; } @Override public void resetPrimaryKeysModified() { modified &= (~(FD_FACE_ID_ID_MASK)); } /** * Resets columns modification status except primary keys to 'not modified'. */ public void resetModifiedExceptPrimaryKeys() { modified &= (~(FD_FACE_ID_IMAGE_MD5_MASK | FD_FACE_ID_FEATURE_MD5_MASK | FD_FACE_ID_FACE_LEFT_MASK | FD_FACE_ID_FACE_TOP_MASK | FD_FACE_ID_FACE_WIDTH_MASK | FD_FACE_ID_FACE_HEIGHT_MASK | FD_FACE_ID_EYE_LEFTX_MASK | FD_FACE_ID_EYE_LEFTY_MASK | FD_FACE_ID_EYE_RIGHTX_MASK | FD_FACE_ID_EYE_RIGHTY_MASK | FD_FACE_ID_MOUTH_X_MASK | FD_FACE_ID_MOUTH_Y_MASK | FD_FACE_ID_NOSE_X_MASK | FD_FACE_ID_NOSE_Y_MASK | FD_FACE_ID_ANGLE_YAW_MASK | FD_FACE_ID_ANGLE_PITCH_MASK | FD_FACE_ID_ANGLE_ROLL_MASK | FD_FACE_ID_ANGLE_CONFIDENCE_MASK | FD_FACE_ID_EXT_INFO_MASK | FD_FACE_ID_CREATE_TIME_MASK)); } /** * Resets the object initialization status to 'not initialized'. */ private void resetInitialized() { initialized = 0L; } /** reset all fields to initial value, equal to a new bean */ public void reset(){ checkMutable(); this.id = null; this.imageMd5 = null; this.featureMd5 = null; this.faceLeft = null; this.faceTop = null; this.faceWidth = null; this.faceHeight = null; this.eyeLeftx = null; this.eyeLefty = null; this.eyeRightx = null; this.eyeRighty = null; this.mouthX = null; this.mouthY = null; this.noseX = null; this.noseY = null; this.angleYaw = null; this.anglePitch = null; this.angleRoll = null; this.angleConfidence = null; this.extInfo = null; /* DEFAULT:'CURRENT_TIMESTAMP'*/ this.createTime = null; this.isNew = true; this.modified = 0L; this.initialized = 0L; } @Override public boolean equals(Object object) { if (!(object instanceof FdFaceBean)) { return false; } FdFaceBean obj = (FdFaceBean) object; return new EqualsBuilder() .append(getId(), obj.getId()) .append(getImageMd5(), obj.getImageMd5()) .append(getFeatureMd5(), obj.getFeatureMd5()) .append(getFaceLeft(), obj.getFaceLeft()) .append(getFaceTop(), obj.getFaceTop()) .append(getFaceWidth(), obj.getFaceWidth()) .append(getFaceHeight(), obj.getFaceHeight()) .append(getEyeLeftx(), obj.getEyeLeftx()) .append(getEyeLefty(), obj.getEyeLefty()) .append(getEyeRightx(), obj.getEyeRightx()) .append(getEyeRighty(), obj.getEyeRighty()) .append(getMouthX(), obj.getMouthX()) .append(getMouthY(), obj.getMouthY()) .append(getNoseX(), obj.getNoseX()) .append(getNoseY(), obj.getNoseY()) .append(getAngleYaw(), obj.getAngleYaw()) .append(getAnglePitch(), obj.getAnglePitch()) .append(getAngleRoll(), obj.getAngleRoll()) .append(getAngleConfidence(), obj.getAngleConfidence()) .append(getExtInfo(), obj.getExtInfo()) .append(getCreateTime(), obj.getCreateTime()) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder(-82280557, -700257973) .append(getId()) .toHashCode(); } @Override public String toString() { return toString(true,false); } /** * cast byte array to HEX string * * @param input * @return {@code null} if {@code input} is null */ private static final String toHex(byte[] input) { if (null == input){ return null; } StringBuffer sb = new StringBuffer(input.length * 2); for (int i = 0; i < input.length; i++) { sb.append(Character.forDigit((input[i] & 240) >> 4, 16)); sb.append(Character.forDigit(input[i] & 15, 16)); } return sb.toString(); } protected static final StringBuilder append(StringBuilder buffer,boolean full,byte[] value){ if(full || null == value){ buffer.append(toHex(value)); }else{ buffer.append(value.length).append(" bytes"); } return buffer; } private static int stringLimit = 64; private static final int MINIMUM_LIMIT = 16; protected static final StringBuilder append(StringBuilder buffer,boolean full,String value){ if(full || null == value || value.length() <= stringLimit){ buffer.append(value); }else{ buffer.append(value.substring(0,stringLimit - 8)).append(" ...").append(value.substring(stringLimit-4,stringLimit)); } return buffer; } protected static final StringBuilder append(StringBuilder buffer,boolean full,T value){ return buffer.append(value); } public static final void setStringLimit(int limit){ if(limit < MINIMUM_LIMIT){ throw new IllegalArgumentException(String.format("INVALID limit %d,minimum value %d",limit,MINIMUM_LIMIT)); } stringLimit = limit; } @Override public String toString(boolean notNull, boolean fullIfStringOrBytes) { // only output initialized field StringBuilder builder = new StringBuilder(this.getClass().getName()).append("@").append(Integer.toHexString(this.hashCode())).append("["); int count = 0; if(checkIdInitialized()){ if(!notNull || null != getId()){ if(count++ >0){ builder.append(","); } builder.append("id="); append(builder,fullIfStringOrBytes,getId()); } } if(checkImageMd5Initialized()){ if(!notNull || null != getImageMd5()){ if(count++ >0){ builder.append(","); } builder.append("image_md5="); append(builder,fullIfStringOrBytes,getImageMd5()); } } if(checkFeatureMd5Initialized()){ if(!notNull || null != getFeatureMd5()){ if(count++ >0){ builder.append(","); } builder.append("feature_md5="); append(builder,fullIfStringOrBytes,getFeatureMd5()); } } if(checkFaceLeftInitialized()){ if(!notNull || null != getFaceLeft()){ if(count++ >0){ builder.append(","); } builder.append("face_left="); append(builder,fullIfStringOrBytes,getFaceLeft()); } } if(checkFaceTopInitialized()){ if(!notNull || null != getFaceTop()){ if(count++ >0){ builder.append(","); } builder.append("face_top="); append(builder,fullIfStringOrBytes,getFaceTop()); } } if(checkFaceWidthInitialized()){ if(!notNull || null != getFaceWidth()){ if(count++ >0){ builder.append(","); } builder.append("face_width="); append(builder,fullIfStringOrBytes,getFaceWidth()); } } if(checkFaceHeightInitialized()){ if(!notNull || null != getFaceHeight()){ if(count++ >0){ builder.append(","); } builder.append("face_height="); append(builder,fullIfStringOrBytes,getFaceHeight()); } } if(checkEyeLeftxInitialized()){ if(!notNull || null != getEyeLeftx()){ if(count++ >0){ builder.append(","); } builder.append("eye_leftx="); append(builder,fullIfStringOrBytes,getEyeLeftx()); } } if(checkEyeLeftyInitialized()){ if(!notNull || null != getEyeLefty()){ if(count++ >0){ builder.append(","); } builder.append("eye_lefty="); append(builder,fullIfStringOrBytes,getEyeLefty()); } } if(checkEyeRightxInitialized()){ if(!notNull || null != getEyeRightx()){ if(count++ >0){ builder.append(","); } builder.append("eye_rightx="); append(builder,fullIfStringOrBytes,getEyeRightx()); } } if(checkEyeRightyInitialized()){ if(!notNull || null != getEyeRighty()){ if(count++ >0){ builder.append(","); } builder.append("eye_righty="); append(builder,fullIfStringOrBytes,getEyeRighty()); } } if(checkMouthXInitialized()){ if(!notNull || null != getMouthX()){ if(count++ >0){ builder.append(","); } builder.append("mouth_x="); append(builder,fullIfStringOrBytes,getMouthX()); } } if(checkMouthYInitialized()){ if(!notNull || null != getMouthY()){ if(count++ >0){ builder.append(","); } builder.append("mouth_y="); append(builder,fullIfStringOrBytes,getMouthY()); } } if(checkNoseXInitialized()){ if(!notNull || null != getNoseX()){ if(count++ >0){ builder.append(","); } builder.append("nose_x="); append(builder,fullIfStringOrBytes,getNoseX()); } } if(checkNoseYInitialized()){ if(!notNull || null != getNoseY()){ if(count++ >0){ builder.append(","); } builder.append("nose_y="); append(builder,fullIfStringOrBytes,getNoseY()); } } if(checkAngleYawInitialized()){ if(!notNull || null != getAngleYaw()){ if(count++ >0){ builder.append(","); } builder.append("angle_yaw="); append(builder,fullIfStringOrBytes,getAngleYaw()); } } if(checkAnglePitchInitialized()){ if(!notNull || null != getAnglePitch()){ if(count++ >0){ builder.append(","); } builder.append("angle_pitch="); append(builder,fullIfStringOrBytes,getAnglePitch()); } } if(checkAngleRollInitialized()){ if(!notNull || null != getAngleRoll()){ if(count++ >0){ builder.append(","); } builder.append("angle_roll="); append(builder,fullIfStringOrBytes,getAngleRoll()); } } if(checkAngleConfidenceInitialized()){ if(!notNull || null != getAngleConfidence()){ if(count++ >0){ builder.append(","); } builder.append("angle_confidence="); append(builder,fullIfStringOrBytes,getAngleConfidence()); } } if(checkExtInfoInitialized()){ if(!notNull || null != getExtInfo()){ if(count++ >0){ builder.append(","); } builder.append("ext_info="); append(builder,fullIfStringOrBytes,getExtInfo()); } } if(checkCreateTimeInitialized()){ if(!notNull || null != getCreateTime()){ if(count++ >0){ builder.append(","); } builder.append("create_time="); append(builder,fullIfStringOrBytes,getCreateTime()); } } builder.append("]"); return builder.toString(); } @Override public int compareTo(FdFaceBean object){ return new CompareToBuilder() .append(getId(), object.getId()) .append(getImageMd5(), object.getImageMd5()) .append(getFeatureMd5(), object.getFeatureMd5()) .append(getFaceLeft(), object.getFaceLeft()) .append(getFaceTop(), object.getFaceTop()) .append(getFaceWidth(), object.getFaceWidth()) .append(getFaceHeight(), object.getFaceHeight()) .append(getEyeLeftx(), object.getEyeLeftx()) .append(getEyeLefty(), object.getEyeLefty()) .append(getEyeRightx(), object.getEyeRightx()) .append(getEyeRighty(), object.getEyeRighty()) .append(getMouthX(), object.getMouthX()) .append(getMouthY(), object.getMouthY()) .append(getNoseX(), object.getNoseX()) .append(getNoseY(), object.getNoseY()) .append(getAngleYaw(), object.getAngleYaw()) .append(getAnglePitch(), object.getAnglePitch()) .append(getAngleRoll(), object.getAngleRoll()) .append(getAngleConfidence(), object.getAngleConfidence()) .append(getExtInfo(), object.getExtInfo()) .append(getCreateTime(), object.getCreateTime()) .toComparison(); } @Override public FdFaceBean clone(){ try { return (FdFaceBean) super.clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } /** * Make {@code this} to a NULL bean
* set all fields to null, {@link #modified} and {@link #initialized} be set to 0 * @return {@code this} bean * @author guyadong */ public FdFaceBean asNULL() { checkMutable(); setId((Integer)null); setImageMd5((String)null); setFeatureMd5((String)null); setFaceLeft((Integer)null); setFaceTop((Integer)null); setFaceWidth((Integer)null); setFaceHeight((Integer)null); setEyeLeftx((Integer)null); setEyeLefty((Integer)null); setEyeRightx((Integer)null); setEyeRighty((Integer)null); setMouthX((Integer)null); setMouthY((Integer)null); setNoseX((Integer)null); setNoseY((Integer)null); setAngleYaw((Integer)null); setAnglePitch((Integer)null); setAngleRoll((Integer)null); setAngleConfidence((Float)null); setExtInfo((java.nio.ByteBuffer)null); setCreateTime((java.util.Date)null); isNew(true); resetInitialized(); resetIsModified(); return this; } /** * check whether this bean is a NULL bean * @return {@code true} if {@link {@link #initialized} be set to zero * @see #asNULL() */ public boolean checkNULL(){ return 0L == getInitialized(); } /** * @return {@code source} replace {@code null} element with null instance({@link #NULL}) */ public static final List replaceNull(List source){ if(null != source){ for(int i = 0,endIndex = source.size();i replaceNullInstance(List source){ if(null != source){ for(int i = 0,endIndex = source.size();iT getValue(int columnID) { switch( columnID ){ case FD_FACE_ID_ID: return (T)getId(); case FD_FACE_ID_IMAGE_MD5: return (T)getImageMd5(); case FD_FACE_ID_FEATURE_MD5: return (T)getFeatureMd5(); case FD_FACE_ID_FACE_LEFT: return (T)getFaceLeft(); case FD_FACE_ID_FACE_TOP: return (T)getFaceTop(); case FD_FACE_ID_FACE_WIDTH: return (T)getFaceWidth(); case FD_FACE_ID_FACE_HEIGHT: return (T)getFaceHeight(); case FD_FACE_ID_EYE_LEFTX: return (T)getEyeLeftx(); case FD_FACE_ID_EYE_LEFTY: return (T)getEyeLefty(); case FD_FACE_ID_EYE_RIGHTX: return (T)getEyeRightx(); case FD_FACE_ID_EYE_RIGHTY: return (T)getEyeRighty(); case FD_FACE_ID_MOUTH_X: return (T)getMouthX(); case FD_FACE_ID_MOUTH_Y: return (T)getMouthY(); case FD_FACE_ID_NOSE_X: return (T)getNoseX(); case FD_FACE_ID_NOSE_Y: return (T)getNoseY(); case FD_FACE_ID_ANGLE_YAW: return (T)getAngleYaw(); case FD_FACE_ID_ANGLE_PITCH: return (T)getAnglePitch(); case FD_FACE_ID_ANGLE_ROLL: return (T)getAngleRoll(); case FD_FACE_ID_ANGLE_CONFIDENCE: return (T)getAngleConfidence(); case FD_FACE_ID_EXT_INFO: return (T)getExtInfo(); case FD_FACE_ID_CREATE_TIME: return (T)getCreateTime(); default: return null; } } @Override public void setValue(int columnID,T value) { switch( columnID ) { case FD_FACE_ID_ID: setId((Integer)value); break; case FD_FACE_ID_IMAGE_MD5: setImageMd5((String)value); break; case FD_FACE_ID_FEATURE_MD5: setFeatureMd5((String)value); break; case FD_FACE_ID_FACE_LEFT: setFaceLeft((Integer)value); break; case FD_FACE_ID_FACE_TOP: setFaceTop((Integer)value); break; case FD_FACE_ID_FACE_WIDTH: setFaceWidth((Integer)value); break; case FD_FACE_ID_FACE_HEIGHT: setFaceHeight((Integer)value); break; case FD_FACE_ID_EYE_LEFTX: setEyeLeftx((Integer)value); break; case FD_FACE_ID_EYE_LEFTY: setEyeLefty((Integer)value); break; case FD_FACE_ID_EYE_RIGHTX: setEyeRightx((Integer)value); break; case FD_FACE_ID_EYE_RIGHTY: setEyeRighty((Integer)value); break; case FD_FACE_ID_MOUTH_X: setMouthX((Integer)value); break; case FD_FACE_ID_MOUTH_Y: setMouthY((Integer)value); break; case FD_FACE_ID_NOSE_X: setNoseX((Integer)value); break; case FD_FACE_ID_NOSE_Y: setNoseY((Integer)value); break; case FD_FACE_ID_ANGLE_YAW: setAngleYaw((Integer)value); break; case FD_FACE_ID_ANGLE_PITCH: setAnglePitch((Integer)value); break; case FD_FACE_ID_ANGLE_ROLL: setAngleRoll((Integer)value); break; case FD_FACE_ID_ANGLE_CONFIDENCE: setAngleConfidence((Float)value); break; case FD_FACE_ID_EXT_INFO: setExtInfo((java.nio.ByteBuffer)value); break; case FD_FACE_ID_CREATE_TIME: setCreateTime((java.util.Date)value); break; default: break; } } @Override public T getValue(String column) { return getValue(columnIDOf(column)); } @Override public void setValue(String column,T value) { setValue(columnIDOf(column),value); } /** return column id for the given field name or negative if {@code column} is invalid name */ public static int columnIDOf(String column){ int index = FD_FACE_FIELDS_LIST.indexOf(column); return index < 0 ? FD_FACE_JAVA_FIELDS_LIST.indexOf(column) : index; } public static final Builder builder(){ return new Builder(); } /** * a builder for FdFaceBean,the template instance is thread local variable * a instance of Builder can be reused. */ public static final class Builder{ /** FdFaceBean instance used for template to create new FdFaceBean instance. */ static final ThreadLocal TEMPLATE = new ThreadLocal(){ @Override protected FdFaceBean initialValue() { return new FdFaceBean(); }}; private Builder() {} /** * reset the bean as template * @see FdFaceBean#reset() */ public Builder reset(){ TEMPLATE.get().reset(); return this; } /** set a bean as template,must not be {@code null} */ public Builder template(FdFaceBean bean){ if(null == bean){ throw new NullPointerException(); } TEMPLATE.set(bean); return this; } /** return a clone instance of {@link #TEMPLATE}*/ public FdFaceBean build(){ return TEMPLATE.get().clone(); } /** * fill the field : fd_face.id * @param id 主键 * @see {@link FdFaceBean#getId()} * @see {@link FdFaceBean#setId(Integer)} */ public Builder id(Integer id){ TEMPLATE.get().setId(id); return this; } /** * fill the field : fd_face.image_md5 * @param imageMd5 外键,所属图像id * @see {@link FdFaceBean#getImageMd5()} * @see {@link FdFaceBean#setImageMd5(String)} */ public Builder imageMd5(String imageMd5){ TEMPLATE.get().setImageMd5(imageMd5); return this; } /** * fill the field : fd_face.feature_md5 * @param featureMd5 外键,人脸特征数据MD5 id * @see {@link FdFaceBean#getFeatureMd5()} * @see {@link FdFaceBean#setFeatureMd5(String)} */ public Builder featureMd5(String featureMd5){ TEMPLATE.get().setFeatureMd5(featureMd5); return this; } /** * fill the field : fd_face.face_left * @param faceLeft * @see {@link FdFaceBean#getFaceLeft()} * @see {@link FdFaceBean#setFaceLeft(Integer)} */ public Builder faceLeft(Integer faceLeft){ TEMPLATE.get().setFaceLeft(faceLeft); return this; } /** * fill the field : fd_face.face_top * @param faceTop * @see {@link FdFaceBean#getFaceTop()} * @see {@link FdFaceBean#setFaceTop(Integer)} */ public Builder faceTop(Integer faceTop){ TEMPLATE.get().setFaceTop(faceTop); return this; } /** * fill the field : fd_face.face_width * @param faceWidth * @see {@link FdFaceBean#getFaceWidth()} * @see {@link FdFaceBean#setFaceWidth(Integer)} */ public Builder faceWidth(Integer faceWidth){ TEMPLATE.get().setFaceWidth(faceWidth); return this; } /** * fill the field : fd_face.face_height * @param faceHeight * @see {@link FdFaceBean#getFaceHeight()} * @see {@link FdFaceBean#setFaceHeight(Integer)} */ public Builder faceHeight(Integer faceHeight){ TEMPLATE.get().setFaceHeight(faceHeight); return this; } /** * fill the field : fd_face.eye_leftx * @param eyeLeftx * @see {@link FdFaceBean#getEyeLeftx()} * @see {@link FdFaceBean#setEyeLeftx(Integer)} */ public Builder eyeLeftx(Integer eyeLeftx){ TEMPLATE.get().setEyeLeftx(eyeLeftx); return this; } /** * fill the field : fd_face.eye_lefty * @param eyeLefty * @see {@link FdFaceBean#getEyeLefty()} * @see {@link FdFaceBean#setEyeLefty(Integer)} */ public Builder eyeLefty(Integer eyeLefty){ TEMPLATE.get().setEyeLefty(eyeLefty); return this; } /** * fill the field : fd_face.eye_rightx * @param eyeRightx * @see {@link FdFaceBean#getEyeRightx()} * @see {@link FdFaceBean#setEyeRightx(Integer)} */ public Builder eyeRightx(Integer eyeRightx){ TEMPLATE.get().setEyeRightx(eyeRightx); return this; } /** * fill the field : fd_face.eye_righty * @param eyeRighty * @see {@link FdFaceBean#getEyeRighty()} * @see {@link FdFaceBean#setEyeRighty(Integer)} */ public Builder eyeRighty(Integer eyeRighty){ TEMPLATE.get().setEyeRighty(eyeRighty); return this; } /** * fill the field : fd_face.mouth_x * @param mouthX * @see {@link FdFaceBean#getMouthX()} * @see {@link FdFaceBean#setMouthX(Integer)} */ public Builder mouthX(Integer mouthX){ TEMPLATE.get().setMouthX(mouthX); return this; } /** * fill the field : fd_face.mouth_y * @param mouthY * @see {@link FdFaceBean#getMouthY()} * @see {@link FdFaceBean#setMouthY(Integer)} */ public Builder mouthY(Integer mouthY){ TEMPLATE.get().setMouthY(mouthY); return this; } /** * fill the field : fd_face.nose_x * @param noseX * @see {@link FdFaceBean#getNoseX()} * @see {@link FdFaceBean#setNoseX(Integer)} */ public Builder noseX(Integer noseX){ TEMPLATE.get().setNoseX(noseX); return this; } /** * fill the field : fd_face.nose_y * @param noseY * @see {@link FdFaceBean#getNoseY()} * @see {@link FdFaceBean#setNoseY(Integer)} */ public Builder noseY(Integer noseY){ TEMPLATE.get().setNoseY(noseY); return this; } /** * fill the field : fd_face.angle_yaw * @param angleYaw * @see {@link FdFaceBean#getAngleYaw()} * @see {@link FdFaceBean#setAngleYaw(Integer)} */ public Builder angleYaw(Integer angleYaw){ TEMPLATE.get().setAngleYaw(angleYaw); return this; } /** * fill the field : fd_face.angle_pitch * @param anglePitch * @see {@link FdFaceBean#getAnglePitch()} * @see {@link FdFaceBean#setAnglePitch(Integer)} */ public Builder anglePitch(Integer anglePitch){ TEMPLATE.get().setAnglePitch(anglePitch); return this; } /** * fill the field : fd_face.angle_roll * @param angleRoll * @see {@link FdFaceBean#getAngleRoll()} * @see {@link FdFaceBean#setAngleRoll(Integer)} */ public Builder angleRoll(Integer angleRoll){ TEMPLATE.get().setAngleRoll(angleRoll); return this; } /** * fill the field : fd_face.angle_confidence * @param angleConfidence * @see {@link FdFaceBean#getAngleConfidence()} * @see {@link FdFaceBean#setAngleConfidence(Float)} */ public Builder angleConfidence(Float angleConfidence){ TEMPLATE.get().setAngleConfidence(angleConfidence); return this; } /** * fill the field : fd_face.ext_info * @param extInfo 扩展字段,保存人脸检测基本信息之外的其他数据,内容由SDK负责解析 * @see {@link FdFaceBean#getExtInfo()} * @see {@link FdFaceBean#setExtInfo(java.nio.ByteBuffer)} */ public Builder extInfo(java.nio.ByteBuffer extInfo){ TEMPLATE.get().setExtInfo(extInfo); return this; } /** * fill the field : fd_face.create_time * @param createTime * @see {@link FdFaceBean#getCreateTime()} * @see {@link FdFaceBean#setCreateTime(java.util.Date)} */ public Builder createTime(java.util.Date createTime){ TEMPLATE.get().setCreateTime(createTime); return this; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy