Hibernate xml property placeholder for lucene index field



I'm pretty new to Hibernate and to XML so I'm sorry if this is a silly question.


I am editing code and am working with the following .hbm.xml file:



<id name="caseId" column="CallID">
<generator class="native"/>
</id>
<property name="IssueTitle" column="CallSubject">
<type name="jcolibri.connector.databaseutils.GenericUserType">
<param name="className">jcolibri.datatypes.Text</param>
</type>
</property>
<property name="IssueDescription" column="CallDesc">
<type name="jcolibri.connector.databaseutils.GenericUserType">
<param name="className">jcolibri.datatypes.Text</param>
</type>
</property>


and here is the associated Java class:



package test.db1;

import core.Attribute;
import datatypes.Text;

public class dbDescription implements core.CaseComponent
{
String caseId;
Text issueTitle, issueDescription, issueIndexDescription;

public String getCaseId()
{
return caseId;
}

public void setCaseId(String caseId)
{
this.caseId = caseId;
}

public Text getIssueTitle()
{
return issueTitle;
}

public void setIssueTitle(Text issueTitle)
{
this.issueTitle = issueTitle;
}

public Text getIssueDescription()
{
return issueDescription;
}

public void setIssueDescription(Text issueDescription)
{
this.issueDescription = issueDescription;
}

public Attribute getIdAttribute()
{
return new Attribute("caseId", this.getClass());
}

public Text getIssueIndexDescription()
{
return issueIndexDescription;
}

public void setIssueIndexDescription(Text issueIndexDescription)
{
this.issueIndexDescription = issueIndexDescription;
}
}


I have a Lucene index that's also being read in from the file system and I want to store its values in the issueIndexDescription variable. Is it possible to set up another property in the Hibernate file that doesn't link up to a column so that it's there as a placeholder? I want to be able to tell the program that the property exists and give it a type but not actually populate it. Or am I going about this the totally wrong way?


No comments:

Post a Comment