Fix for ALF-1578: Custom property data fields not searchable due to lucene DEFAULT.ftsIndexerJobDetail exception

- corrected default behaviour in the M2 model by  moving from the JibXed classes (we tend not to define default values in the m2 binding)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19070 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2010-03-04 15:05:45 +00:00
parent e14e100480
commit b77cbc5ee2
2 changed files with 42 additions and 14 deletions

View File

@@ -41,10 +41,10 @@ public class M2Property
private boolean isMandatoryEnforced = false; private boolean isMandatoryEnforced = false;
private boolean isMultiValued = false; private boolean isMultiValued = false;
private String defaultValue = null; private String defaultValue = null;
private boolean isIndexed = true; private Boolean isIndexed = null;
private boolean isIndexedAtomically = true; private Boolean isIndexedAtomically = null;
private boolean isStoredInIndex = false; private Boolean isStoredInIndex = null;
private IndexTokenisationMode indexTokenisationMode = IndexTokenisationMode.TRUE; private IndexTokenisationMode indexTokenisationMode = null;
private List<M2Constraint> constraints = new ArrayList<M2Constraint>(); private List<M2Constraint> constraints = new ArrayList<M2Constraint>();
/*package*/ M2Property() /*package*/ M2Property()
@@ -171,7 +171,7 @@ public class M2Property
} }
public boolean isIndexed() public Boolean isIndexed()
{ {
return isIndexed; return isIndexed;
} }
@@ -179,11 +179,11 @@ public class M2Property
public void setIndexed(boolean isIndexed) public void setIndexed(boolean isIndexed)
{ {
this.isIndexed = isIndexed; this.isIndexed = Boolean.valueOf(isIndexed);
} }
public boolean isStoredInIndex() public Boolean isStoredInIndex()
{ {
return isStoredInIndex; return isStoredInIndex;
} }
@@ -191,11 +191,11 @@ public class M2Property
public void setStoredInIndex(boolean isStoredInIndex) public void setStoredInIndex(boolean isStoredInIndex)
{ {
this.isStoredInIndex = isStoredInIndex; this.isStoredInIndex = Boolean.valueOf(isStoredInIndex);
} }
public boolean isIndexedAtomically() public Boolean isIndexedAtomically()
{ {
return isIndexedAtomically; return isIndexedAtomically;
} }
@@ -203,7 +203,7 @@ public class M2Property
public void setIndexedAtomically(boolean isIndexedAtomically) public void setIndexedAtomically(boolean isIndexedAtomically)
{ {
this.isIndexedAtomically = isIndexedAtomically; this.isIndexedAtomically = Boolean.valueOf(isIndexedAtomically);
} }

View File

@@ -355,36 +355,64 @@ import org.alfresco.util.EqualsHelper;
* @see org.alfresco.repo.dictionary.PropertyDefinition#isIndexed() * @see org.alfresco.repo.dictionary.PropertyDefinition#isIndexed()
*/ */
public boolean isIndexed() public boolean isIndexed()
{
if(m2Property.isIndexed() == null)
{
return true;
}
else
{ {
return m2Property.isIndexed(); return m2Property.isIndexed();
} }
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.alfresco.repo.dictionary.PropertyDefinition#isStoredInIndex() * @see org.alfresco.repo.dictionary.PropertyDefinition#isStoredInIndex()
*/ */
public boolean isStoredInIndex() public boolean isStoredInIndex()
{
if(m2Property.isStoredInIndex() == null)
{
return false;
}
else
{ {
return m2Property.isStoredInIndex(); return m2Property.isStoredInIndex();
} }
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.alfresco.repo.dictionary.PropertyDefinition#isIndexedAtomically() * @see org.alfresco.repo.dictionary.PropertyDefinition#isIndexedAtomically()
*/ */
public boolean isIndexedAtomically() public boolean isIndexedAtomically()
{
if(m2Property.isIndexedAtomically() == null)
{
return true;
}
else
{ {
return m2Property.isIndexedAtomically(); return m2Property.isIndexedAtomically();
} }
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.alfresco.repo.dictionary.PropertyDefinition#isTokenisedInIndex() * @see org.alfresco.repo.dictionary.PropertyDefinition#isTokenisedInIndex()
*/ */
public IndexTokenisationMode getIndexTokenisationMode() public IndexTokenisationMode getIndexTokenisationMode()
{
if(m2Property.getIndexTokenisationMode() == null)
{
return IndexTokenisationMode.TRUE;
}
else
{ {
return m2Property.getIndexTokenisationMode(); return m2Property.getIndexTokenisationMode();
} }
}
/* (non-Javadoc) /* (non-Javadoc)