Object - (Accessors|Get|Getter) Methods

Card Puncher Data Processing

About

Accessors are methods. Their role are to return the values of an object's state (a field in Java, a property in Javascript…)

For the same field, you can have several getter:

  • get: to get the value
  • getDefault: to return the default value
  • getOrDefault to return the value or the default

If the creation of object is expensive, you can also have a cache of objects and return the cache instead.

The Get method is the accessor while the Set method is known as the mutator method.





Discover More
Model Funny
(Function | Operator | Map | Mapping | Transformation | Method | Rule | Task | Subroutine)

Section computable function. A function is a callable unit that may be called: a procedure, a subrontine a routine, a method (belong to an objectmacrocomputablalgorithreusable blocargumentdevelopment...
Card Puncher Data Processing
How to develop a Task for Ant?

How to develop a Task for Ant A class is registered as an AnT task if it's provide a method with the signature “public void execute()”. The class doesn't need to extends no superclass and...
Java Conceptuel Diagram
How to exclude properties from the JSON output with Jackson?

This article lists the techniques that may be used with the Jackson libary to filter out some properties of an object when transforming it as a JSON. Filter There are 5 techniques that you can apply...
Java Conceptuel Diagram
J2EE - JPA and Stateless Session Bean (EJB) as Data Access Object (DAO)

Stateless EJB session beans as Data Access Object (DAO) implementation with JPA. You must use the EntityManagerFactory to get an EntityManager The resulting EntityManager instance is a PersistenceContext/Cache...
Jdbc Class Architecture
JDBC - Resultset (SELECT|SQL query)

The java/sql/ResultSetResultSet interface encapsulates the results of an SQL query and implements a cursor API. Statements may also be batched, allowing an application to submit multiple updates to a data...
Java Conceptuel Diagram
JMX - Mbean (Managed Bean|Manageable resource)

A managed bean (MBean) is a Java object that represents a JMX manageable resource in a distributed environment, such as: an application, a service, a component or a device. An MBean is a namedmanaged...
Jpa Mapping Method
JPA - Entity Annotations

A key feature of EJB 3.0 and JPA is the ability to create entities that contain object-relational mappings by using (metadata) annotations rather than deployment descriptors (orm.xml) as in earlier versions....
Jdeveloper Create Managed Bean
JSF - (Managed Bean|Controller)

Managed Beans (also known as model objects and controllers) are lightweight container-managed objects (POJOs) with minimal requirements. They support a small set of basic services, such as: resource...
Java Conceptuel Diagram
Java - JavaBean (Bean)

A JavaBean is java class conforming to the below convention. A bean is an Java Object that: is serializable, has a nullary constructor, has public properties, allows access to this properties...
Java Conceptuel Diagram
Java - Plain Old Java object (POJO) or javaBean

POJO (or JavaBean) consists simply of a single class that is only meant to hold data met There is no requirement for multiple classes like EJBs Plain Old Java Object



Share this page:
Follow us:
Task Runner