}
return false;
}
}
AnnotationDescr annotationDescr = typeDescr.getAnnotation( TypeDeclaration.ATTR_TIMESTAMP );
String timestamp = ( annotationDescr != null ) ? annotationDescr.getSingleValue() : null;
if (timestamp != null) {
type.setTimestampAttribute( timestamp );
Package pkg = pkgRegistry.getPackage();
InternalReadAccessor reader = pkg.getClassFieldAccessorStore().getMVELReader( ClassUtils.getPackage(type.getTypeClass()),
type.getTypeClass().getName(),
timestamp,
type.isTypesafe() );
MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( "mvel" );
data.addCompileable( (MVELCompileable) reader );
( (MVELCompileable) reader ).compile( data );
type.setTimestampExtractor( reader );
}
annotationDescr = typeDescr.getAnnotation( TypeDeclaration.ATTR_DURATION );
String duration = ( annotationDescr != null ) ? annotationDescr.getSingleValue() : null;
if (duration != null) {
type.setDurationAttribute( duration );
Package pkg = pkgRegistry.getPackage();
InternalReadAccessor reader = pkg.getClassFieldAccessorStore().getMVELReader( ClassUtils.getPackage( type.getTypeClass() ),
type.getTypeClass().getName(),
duration,
type.isTypesafe() );
MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( "mvel" );
data.addCompileable( (MVELCompileable) reader );
( (MVELCompileable) reader ).compile( data );
type.setDurationExtractor( reader );
}
annotationDescr = typeDescr.getAnnotation( TypeDeclaration.ATTR_EXPIRE );
String expiration = ( annotationDescr != null ) ? annotationDescr.getSingleValue() : null;
if (expiration != null) {
if (timeParser == null) {
timeParser = new TimeIntervalParser();
}
type.setExpirationOffset( timeParser.parse( expiration )[0] );