IDEMPIERE-1231 Add non-persistent attributes support to PO. Peer review.

This commit is contained in:
Heng Sin Low 2013-08-01 21:58:23 +08:00
parent 62dcd54f19
commit 31426fbf60
2 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ public class MRegistration extends X_A_Registration
/** /**
* *
*/ */
private static final long serialVersionUID = -2301393326847864746L; private static final long serialVersionUID = -5178339895228217372L;
/** /**
* Standard Constructor * Standard Constructor
@ -91,7 +91,7 @@ public class MRegistration extends X_A_Registration
* Get All Attributes * Get All Attributes
* @return Registration Attributes * @return Registration Attributes
*/ */
public MRegistrationAttribute[] getRegistrationAttributes() public MRegistrationAttribute[] getAttributes()
{ {
if (m_allAttributes == null) if (m_allAttributes == null)
m_allAttributes = MRegistrationAttribute.getAll(getCtx()); m_allAttributes = MRegistrationAttribute.getAll(getCtx());
@ -201,7 +201,7 @@ public class MRegistration extends X_A_Registration
saveEx(); saveEx();
int count = 0; int count = 0;
// read values for all attributes // read values for all attributes
MRegistrationAttribute[] attributes = getRegistrationAttributes(); MRegistrationAttribute[] attributes = getAttributes();
for (int i = 0; i < attributes.length; i++) for (int i = 0; i < attributes.length; i++)
{ {
MRegistrationAttribute attribute = attributes[i]; MRegistrationAttribute attribute = attributes[i];

View File

@ -4518,19 +4518,19 @@ public abstract class PO
log = CLogger.getCLogger(getClass()); log = CLogger.getCLogger(getClass());
} }
public void setAttribute(String columnName, Object value) { public void set_Attribute(String columnName, Object value) {
if (m_attributes == null) if (m_attributes == null)
m_attributes = new HashMap<String, Object>(); m_attributes = new HashMap<String, Object>();
m_attributes.put(columnName, value); m_attributes.put(columnName, value);
} }
public Object getAttribute(String columnName) { public Object get_Attribute(String columnName) {
if (m_attributes != null) if (m_attributes != null)
return m_attributes.get(columnName); return m_attributes.get(columnName);
return null; return null;
} }
public HashMap<String,Object> getAttributes() { public HashMap<String,Object> get_Attributes() {
return m_attributes; return m_attributes;
} }
} // PO } // PO