001package io.ebean.plugin;
002
003/**
004 * Property of a entity bean that can be read.
005 */
006public interface Property {
007
008  /**
009   * Return the name of the property.
010   */
011  String name();
012
013  /**
014   * Deprecated migrate to name().
015   */
016  @Deprecated
017  default String getName() {
018    return name();
019  }
020
021  /**
022   * Return the type of the property.
023   */
024  Class<?> type();
025
026  /**
027   * Deprecated migrate to type().
028   */
029  @Deprecated
030  default Class<?> getPropertyType() {
031    return type();
032  }
033
034  /**
035   * Return the value of the property on the given bean.
036   */
037  Object value(Object bean);
038
039  /**
040   * Deprecated migrate to value().
041   */
042  @Deprecated
043  default Object getVal(Object bean) {
044    return value(bean);
045  }
046
047  /**
048   * Return true if this is a OneToMany or ManyToMany property.
049   */
050  boolean isMany();
051}