Commit c9074d59 by Nilu

adding CompletedProfile attribute to company

parent e708fd06
......@@ -60,7 +60,7 @@ public abstract class BaseCompany extends BaseBusinessClass
public static final String FIELD_LastName = "LastName";
public static final String FIELD_RoleType = "RoleType";
public static final String FIELD_IsLogoDeleted = "IsLogoDeleted";
public static final String FIELD_CompletedInvites = "CompletedInvites";
public static final String FIELD_CompletedProfile = "CompletedProfile";
public static final String SINGLEREFERENCE_AddedByUser = "AddedByUser";
public static final String MULTIPLEREFERENCE_Users = "Users";
public static final String BACKREF_Users = "";
......@@ -88,7 +88,7 @@ public abstract class BaseCompany extends BaseBusinessClass
private static final DefaultAttributeHelper<Company> HELPER_LastName = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<Company, RoleType> HELPER_RoleType = new EnumeratedAttributeHelper<Company, RoleType> (RoleType.FACTORY_RoleType);
private static final DefaultAttributeHelper<Company> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_CompletedInvites = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_CompletedProfile = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
......@@ -108,7 +108,7 @@ public abstract class BaseCompany extends BaseBusinessClass
private String _LastName;
private RoleType _RoleType;
private Boolean _IsLogoDeleted;
private Boolean _CompletedInvites;
private Boolean _CompletedProfile;
// Private attributes corresponding to single references
......@@ -129,7 +129,7 @@ public abstract class BaseCompany extends BaseBusinessClass
private static final AttributeValidator[] FIELD_LastName_Validators;
private static final AttributeValidator[] FIELD_RoleType_Validators;
private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators;
private static final AttributeValidator[] FIELD_CompletedInvites_Validators;
private static final AttributeValidator[] FIELD_CompletedProfile_Validators;
private static final AttributeValidator[] FIELD_CompanyName_Validators;
private static final AttributeValidator[] FIELD_CompanyLogo_Validators;
private static final AttributeValidator[] FIELD_HiringTeamType_Validators;
......@@ -164,7 +164,7 @@ public abstract class BaseCompany extends BaseBusinessClass
FIELD_LastName_Validators = (AttributeValidator[])setupAttribMetaData_LastName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_RoleType_Validators = (AttributeValidator[])setupAttribMetaData_RoleType(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CompletedInvites_Validators = (AttributeValidator[])setupAttribMetaData_CompletedInvites(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CompletedProfile_Validators = (AttributeValidator[])setupAttribMetaData_CompletedProfile(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CompanyName_Validators = (AttributeValidator[])setupAttribMetaData_CompanyName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CompanyLogo_Validators = (AttributeValidator[])setupAttribMetaData_CompanyLogo(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HiringTeamType_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamType(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -323,19 +323,19 @@ public abstract class BaseCompany extends BaseBusinessClass
}
// Meta Info setup
private static List setupAttribMetaData_CompletedInvites(Map validatorMapping)
private static List setupAttribMetaData_CompletedProfile(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("name", "CompletedInvites");
metaInfo.put ("name", "CompletedProfile");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CompletedInvites:", metaInfo);
ATTRIBUTES_METADATA_Company.put (FIELD_CompletedInvites, Collections.unmodifiableMap (metaInfo));
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CompletedProfile:", metaInfo);
ATTRIBUTES_METADATA_Company.put (FIELD_CompletedProfile, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Company.class, "CompletedInvites", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Company.CompletedInvites:", validators);
List validators = BaseBusinessClass.getAttribValidators(Company.class, "CompletedProfile", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Company.CompletedProfile:", validators);
return validators;
}
......@@ -606,7 +606,7 @@ public abstract class BaseCompany extends BaseBusinessClass
_LastName = (String)(HELPER_LastName.initialise (_LastName));
_RoleType = (RoleType)(RoleType.STANDARD);
_IsLogoDeleted = (Boolean)(Boolean.FALSE);
_CompletedInvites = (Boolean)(Boolean.FALSE);
_CompletedProfile = (Boolean)(Boolean.FALSE);
}
......@@ -2207,16 +2207,16 @@ public abstract class BaseCompany extends BaseBusinessClass
}
/**
* Get the attribute CompletedInvites
* Get the attribute CompletedProfile
*/
public Boolean getCompletedInvites ()
public Boolean getCompletedProfile ()
{
assertValid();
Boolean valToReturn = _CompletedInvites;
Boolean valToReturn = _CompletedProfile;
for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
{
valToReturn = bhd.getCompletedInvites ((Company)this, valToReturn);
valToReturn = bhd.getCompletedProfile ((Company)this, valToReturn);
}
return valToReturn;
......@@ -2228,7 +2228,7 @@ public abstract class BaseCompany extends BaseBusinessClass
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preCompletedInvitesChange (Boolean newCompletedInvites) throws FieldException
protected void preCompletedProfileChange (Boolean newCompletedProfile) throws FieldException
{
}
......@@ -2238,46 +2238,46 @@ public abstract class BaseCompany extends BaseBusinessClass
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postCompletedInvitesChange () throws FieldException
protected void postCompletedProfileChange () throws FieldException
{
}
public FieldWriteability getWriteability_CompletedInvites ()
public FieldWriteability getWriteability_CompletedProfile ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute CompletedInvites. Checks to ensure a new value
* Set the attribute CompletedProfile. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCompletedInvites (Boolean newCompletedInvites) throws FieldException
public void setCompletedProfile (Boolean newCompletedProfile) throws FieldException
{
boolean oldAndNewIdentical = HELPER_CompletedInvites.compare (_CompletedInvites, newCompletedInvites);
boolean oldAndNewIdentical = HELPER_CompletedProfile.compare (_CompletedProfile, newCompletedProfile);
try
{
for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
{
newCompletedInvites = bhd.setCompletedInvites ((Company)this, newCompletedInvites);
oldAndNewIdentical = HELPER_CompletedInvites.compare (_CompletedInvites, newCompletedInvites);
newCompletedProfile = bhd.setCompletedProfile ((Company)this, newCompletedProfile);
oldAndNewIdentical = HELPER_CompletedProfile.compare (_CompletedProfile, newCompletedProfile);
}
if (FIELD_CompletedInvites_Validators.length > 0)
if (FIELD_CompletedProfile_Validators.length > 0)
{
Object newCompletedInvitesObj = HELPER_CompletedInvites.toObject (newCompletedInvites);
Object newCompletedProfileObj = HELPER_CompletedProfile.toObject (newCompletedProfile);
if (newCompletedInvitesObj != null)
if (newCompletedProfileObj != null)
{
int loopMax = FIELD_CompletedInvites_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CompletedInvites);
int loopMax = FIELD_CompletedProfile_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CompletedProfile);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_CompletedInvites_Validators[v].checkAttribute (this, FIELD_CompletedInvites, metadata, newCompletedInvitesObj);
FIELD_CompletedProfile_Validators[v].checkAttribute (this, FIELD_CompletedProfile, metadata, newCompletedProfileObj);
}
}
}
......@@ -2295,12 +2295,12 @@ public abstract class BaseCompany extends BaseBusinessClass
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_CompletedInvites () != FieldWriteability.FALSE, "Field CompletedInvites is not writeable");
preCompletedInvitesChange (newCompletedInvites);
markFieldChange (FIELD_CompletedInvites);
_CompletedInvites = newCompletedInvites;
postFieldChange (FIELD_CompletedInvites);
postCompletedInvitesChange ();
Debug.assertion (getWriteability_CompletedProfile () != FieldWriteability.FALSE, "Field CompletedProfile is not writeable");
preCompletedProfileChange (newCompletedProfile);
markFieldChange (FIELD_CompletedProfile);
_CompletedProfile = newCompletedProfile;
postFieldChange (FIELD_CompletedProfile);
postCompletedProfileChange ();
}
}
......@@ -3104,7 +3104,7 @@ public abstract class BaseCompany extends BaseBusinessClass
_LastName = sourceCompany._LastName;
_RoleType = sourceCompany._RoleType;
_IsLogoDeleted = sourceCompany._IsLogoDeleted;
_CompletedInvites = sourceCompany._CompletedInvites;
_CompletedProfile = sourceCompany._CompletedProfile;
}
}
......@@ -3178,7 +3178,7 @@ public abstract class BaseCompany extends BaseBusinessClass
_LastName = (String)(HELPER_LastName.readExternal (_LastName, vals.get(FIELD_LastName))); //
_RoleType = (RoleType)(HELPER_RoleType.readExternal (_RoleType, vals.get(FIELD_RoleType))); //
_IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); //
_CompletedInvites = (Boolean)(HELPER_CompletedInvites.readExternal (_CompletedInvites, vals.get(FIELD_CompletedInvites))); //
_CompletedProfile = (Boolean)(HELPER_CompletedProfile.readExternal (_CompletedProfile, vals.get(FIELD_CompletedProfile))); //
_AddedByUser.readExternalData(vals.get(SINGLEREFERENCE_AddedByUser));
_Users.readExternalData(vals.get(MULTIPLEREFERENCE_Users));
_Clients.readExternalData(vals.get(MULTIPLEREFERENCE_Clients));
......@@ -3209,7 +3209,7 @@ public abstract class BaseCompany extends BaseBusinessClass
vals.put (FIELD_LastName, HELPER_LastName.writeExternal (_LastName));
vals.put (FIELD_RoleType, HELPER_RoleType.writeExternal (_RoleType));
vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted));
vals.put (FIELD_CompletedInvites, HELPER_CompletedInvites.writeExternal (_CompletedInvites));
vals.put (FIELD_CompletedProfile, HELPER_CompletedProfile.writeExternal (_CompletedProfile));
vals.put (SINGLEREFERENCE_AddedByUser, _AddedByUser.writeExternalData());
vals.put (MULTIPLEREFERENCE_Users, _Users.writeExternalData());
vals.put (MULTIPLEREFERENCE_Clients, _Clients.writeExternalData());
......@@ -3292,7 +3292,7 @@ public abstract class BaseCompany extends BaseBusinessClass
visitor.visitField(this, FIELD_LastName, HELPER_LastName.toObject(getLastName()));
visitor.visitField(this, FIELD_RoleType, HELPER_RoleType.toObject(getRoleType()));
visitor.visitField(this, FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.toObject(getIsLogoDeleted()));
visitor.visitField(this, FIELD_CompletedInvites, HELPER_CompletedInvites.toObject(getCompletedInvites()));
visitor.visitField(this, FIELD_CompletedProfile, HELPER_CompletedProfile.toObject(getCompletedProfile()));
}
......@@ -3610,9 +3610,9 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ());
}
else if (attribName.equals (FIELD_CompletedInvites))
else if (attribName.equals (FIELD_CompletedProfile))
{
return HELPER_CompletedInvites.toObject (getCompletedInvites ());
return HELPER_CompletedProfile.toObject (getCompletedProfile ());
}
else
{
......@@ -3691,9 +3691,9 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return HELPER_IsLogoDeleted;
}
else if (attribName.equals (FIELD_CompletedInvites))
else if (attribName.equals (FIELD_CompletedProfile))
{
return HELPER_CompletedInvites;
return HELPER_CompletedProfile;
}
else
{
......@@ -3772,9 +3772,9 @@ public abstract class BaseCompany extends BaseBusinessClass
{
setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue)));
}
else if (attribName.equals (FIELD_CompletedInvites))
else if (attribName.equals (FIELD_CompletedProfile))
{
setCompletedInvites ((Boolean)(HELPER_CompletedInvites.fromObject (_CompletedInvites, attribValue)));
setCompletedProfile ((Boolean)(HELPER_CompletedProfile.fromObject (_CompletedProfile, attribValue)));
}
else
{
......@@ -3872,9 +3872,9 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return getWriteability_IsLogoDeleted ();
}
else if (fieldName.equals (FIELD_CompletedInvites))
else if (fieldName.equals (FIELD_CompletedProfile))
{
return getWriteability_CompletedInvites ();
return getWriteability_CompletedProfile ();
}
else
{
......@@ -3966,9 +3966,9 @@ public abstract class BaseCompany extends BaseBusinessClass
fields.add (FIELD_IsLogoDeleted);
}
if (getWriteability_CompletedInvites () != FieldWriteability.TRUE)
if (getWriteability_CompletedProfile () != FieldWriteability.TRUE)
{
fields.add (FIELD_CompletedInvites);
fields.add (FIELD_CompletedProfile);
}
......@@ -3996,7 +3996,7 @@ public abstract class BaseCompany extends BaseBusinessClass
result.add(HELPER_LastName.getAttribObject (getClass (), _LastName, false, FIELD_LastName));
result.add(HELPER_RoleType.getAttribObject (getClass (), _RoleType, false, FIELD_RoleType));
result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted));
result.add(HELPER_CompletedInvites.getAttribObject (getClass (), _CompletedInvites, false, FIELD_CompletedInvites));
result.add(HELPER_CompletedProfile.getAttribObject (getClass (), _CompletedProfile, false, FIELD_CompletedProfile));
return result;
}
......@@ -4354,21 +4354,21 @@ public abstract class BaseCompany extends BaseBusinessClass
}
/**
* Get the attribute CompletedInvites
* Get the attribute CompletedProfile
*/
public Boolean getCompletedInvites (Company obj, Boolean original)
public Boolean getCompletedProfile (Company obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute CompletedInvites.
* Change the value set for attribute CompletedProfile.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setCompletedInvites (Company obj, Boolean newCompletedInvites) throws FieldException
public Boolean setCompletedProfile (Company obj, Boolean newCompletedProfile) throws FieldException
{
return newCompletedInvites;
return newCompletedProfile;
}
}
......@@ -4451,9 +4451,9 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return toIsLogoDeleted ();
}
if (name.equals ("CompletedInvites"))
if (name.equals ("CompletedProfile"))
{
return toCompletedInvites ();
return toCompletedProfile ();
}
if (name.equals ("CompanyName"))
{
......@@ -4519,7 +4519,7 @@ public abstract class BaseCompany extends BaseBusinessClass
public PipeLine<From, Boolean> toIsLogoDeleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsLogoDeleted)); }
public PipeLine<From, Boolean> toCompletedInvites () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CompletedInvites)); }
public PipeLine<From, Boolean> toCompletedProfile () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CompletedProfile)); }
public PipeLine<From, String> toCompanyName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CompanyName)); }
......@@ -4591,7 +4591,7 @@ public abstract class BaseCompany extends BaseBusinessClass
return true;
}
if(CollectionUtils.equals(attribName, "CompletedInvites"))
if(CollectionUtils.equals(attribName, "CompletedProfile"))
{
return true;
}
......
......@@ -16,7 +16,7 @@
<TRANSIENT name="LastName" type="String"/>
<TRANSIENT name="RoleType" type="RoleType" defaultValue="RoleType.STANDARD" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="CompletedInvites" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="CompletedProfile" type="Boolean" defaultValue="Boolean.FALSE"/>
<TABLE name="tl_company" tablePrefix="object">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment