Repository: cayenne Updated Branches: refs/heads/master 11154a873 -> 47d0fc5f8
New method getDeclaredAttribute(String name) Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/47d0fc5f Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/47d0fc5f Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/47d0fc5f Branch: refs/heads/master Commit: 47d0fc5f88b9a4023df738c0cb99bb82b4825656 Parents: 11154a8 Author: Nikita Timofeev <stari...@gmail.com> Authored: Wed Apr 19 12:40:58 2017 +0300 Committer: Nikita Timofeev <stari...@gmail.com> Committed: Wed Apr 19 12:40:58 2017 +0300 ---------------------------------------------------------------------- .../main/java/org/apache/cayenne/map/ObjEntity.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/47d0fc5f/cayenne-server/src/main/java/org/apache/cayenne/map/ObjEntity.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/map/ObjEntity.java b/cayenne-server/src/main/java/org/apache/cayenne/map/ObjEntity.java index 36ae437..055d753 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/map/ObjEntity.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/map/ObjEntity.java @@ -814,6 +814,21 @@ public class ObjEntity extends Entity implements ObjEntityListener, Configuratio } /** + * Finds attribute declared by this ObjEntity, + * excluding inherited attributes. + * + * @param name of the attribute + * @return declared attribute or null if no attribute is found + * + * @see ObjEntity#getAttribute(String) + * + * @since 4.0 + */ + public ObjAttribute getDeclaredAttribute(String name) { + return (ObjAttribute) super.getAttribute(name); + } + + /** * Returns a named Relationship that either belongs to this ObjEntity or is * inherited. Returns null if no matching attribute is found. */