Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
narendar b
Document Library Custom Field Search
23 de abril de 2013 22:37
Respuesta

narendar b

Ranking: New Member

Mensajes: 2

Fecha de incorporación: 22 de febrero de 2012

Mensajes recientes

Hi,

Please find the issue description below.

We have created a custom field as "hindi-description" under "Documents and Media Document".

While uploading the basic document we are providing some data to custom field "hindi-description" which is storing in the "ExpandoValue" table "data_" column.

Please find the attached screenshot.

Suppose I have 2 or 3 versions of the same document then I need to retrieve the latest version.

I am using the below code

ExpandoColumn column = ExpandoColumnLocalServiceUtil.getDefaultTableColumn(10153, DLFileEntry.class.getName(),"hindi-description"); //here 10153 is companyId


if (column != null) {
DynamicQuery query = DynamicQueryFactoryUtil.forClass(ExpandoValue.class,PortalClassLoaderUtil.getClassLoader());


query.add(RestrictionsFactoryUtil.eq("tableId", column.getTableId()));
query.add(RestrictionsFactoryUtil.eq("columnId", column.getColumnId()));
query.add(RestrictionsFactoryUtil.ilike("data", keyword));

List<ExpandoValue> results = ExpandoColumnLocalServiceUtil.dynamicQuery(query);

for (ExpandoValue expandoValue : results) {

System.out.println(" data_ -----> " + expandoValue.getData());

}
}



Please let me know how to get the latest version and its description.

Also please let me know the relation between DlFileEntry and ExpandoValue tables.

Thanks in advance.
Narendar
Adjunto

archivos adjuntos: Document Libray.JPG (30,8k)