Interface ReadableBean

  • All Superinterfaces:
    MarshallableObject, Marshaller<Object>, Validatable
    All Known Subinterfaces:
    EntityBean, VirtualBean, WritableBean
    All Known Implementing Classes:
    AbstractBean, AbstractVirtualBean, AdvancedBean, Bean, DynamicBean, SimpleEntityBean

    public interface ReadableBean
    extends Validatable, MarshallableObject
    Read interface of a Bean holding arbitrary properties. Unlike plain old Java Beans this offers a lot of advanced features:
    • Simple - no need to write boiler-plate code for implementation such as getters, setters, equals, or hashCode.
    • Generic - fast, easy and reliable introspection via iteration of all properties. No more greedy and slow reflection at runtime (after bootstrapping).
    • Dynamic - supports combination of Java's strong typing with dynamic beans. E.g. if read data from Database, XML, or JSON you can still map "undefined" properties in your Bean. This way a client can receive an object from a newer version of a database or service with added properties that will be kept in the object and send back when the Bean is written back.
    • ReadOnly-Support - create a read-only copy of your object to pass by reference without side-effects.
    • Powerful - WritableProperty supports listeners and bindings as well as generic type information.
    • Validation - build-in validation support.
    • Marshalling - build-in support to read and write the Bean from/to JSON, XML, or other formats. Implement custom datatypes as property and you will not need separate classes or configurations for mapping.
    • Portable - everything relies only on established Java standard mechanisms. No customization of build processes, IDEs, etc. needed. It just works with any build tool (maven, gradle, buildr, ant, etc.) and IDE (Eclipse, IntelliJ, NetBeans, etc.) without plugins and therefore will also work in the future whatever may come.