- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {LocalDateTime l =
new LocalDateTime()
LocalDateTime.now()
DateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
- Smart code suggestions by Codota
}
@SuppressWarnings("unchecked") private static boolean applyNotNull(PersistentAttributeMapping property, ConstraintDescriptor<?> descriptor) { boolean hasNotNull = false; if ( NotNull.class.equals( descriptor.getAnnotation().annotationType() ) ) { // single table inheritance should not be forced to null due to shared state if ( !( property.getEntity() instanceof SingleTableSubclass ) ) { //composite should not add not-null on all columns if ( !isComposite( property ) ) { List<MappedColumn> mappedColumns = property.getValueMapping().getMappedColumns(); mappedColumns.forEach( mappedColumn -> { if ( Column.class.isInstance( mappedColumn ) ) { Column.class.cast( mappedColumn ).setNullable( false ); } else { LOG.debugf( "@NotNull was applied to attribute [%s] which is defined (at least partially) " + "by formula(s); formula portions will be skipped", property.getName() ); } } ); } } hasNotNull = true; } return hasNotNull; }
if ( !isComposite( property) ) { return null; if ( !isComposite(property) ) { return null;
propertyDesc.getConstraintDescriptors(), property, propertyDesc, groups, activateNotNull, dialect ); if ( isComposite( property ) && propertyDesc.isCascaded() ) { Class<?> componentClass = ( (Component) property.getValueMapping() ).getComponentClass();