Java 类org.hibernate.annotations.GenerationTime 实例源码

项目:lams    文件:BasicAttribute.java   
private void checkGeneratedAnnotation() {
    AnnotationInstance generatedAnnotation = JandexHelper.getSingleAnnotation(
            annotations(),
            HibernateDotNames.GENERATED
    );
    if ( generatedAnnotation != null ) {
        this.isInsertable = false;

        AnnotationValue generationTimeValue = generatedAnnotation.value();
        if ( generationTimeValue != null ) {
            GenerationTime genTime = Enum.valueOf( GenerationTime.class, generationTimeValue.asEnum() );
            if ( GenerationTime.ALWAYS.equals( genTime ) ) {
                this.isUpdatable = false;
                this.propertyGeneration = PropertyGeneration.parse( genTime.toString().toLowerCase() );
            }
        }
    }
}
项目:debop4j    文件:IMySqlUpdatedTimestamp.java   
/** MySQL 에서 레코드별로 최신 갱신일자를 표현합니다. */
@Column( updatable = false, insertable = false, columnDefinition = "timestamp default current_timestamp on update current_timestamp" )
@Generated( GenerationTime.ALWAYS )
Timestamp getUpdatedTimestamp();
项目:fiware-ppl    文件:EventLog.java   
/**
 * Returns time stamp value at which the log message was received from
 * the OEE service. This value is automatically generated when the log
 * message is inserted into database.
 *
 * @return time at which the log message was received
 */
@Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
@Generated(GenerationTime.INSERT)
public Date getReceivedAt() {
    return receivedAt;
}