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() ); } } } }
/** MySQL 에서 레코드별로 최신 갱신일자를 표현합니다. */ @Column( updatable = false, insertable = false, columnDefinition = "timestamp default current_timestamp on update current_timestamp" ) @Generated( GenerationTime.ALWAYS ) Timestamp getUpdatedTimestamp();
/** * 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; }