[jira] [Updated] (SOLR-2708) Allow customizable bean mapping for QueryResponse.getBeans(..)

2012-03-25 Thread Chris Male (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Male updated SOLR-2708:
-

Attachment: SOLR-2708.patch

Updated patch.

This patch really changes how DocumentObjectBinder works, trying to make it 
more OO and extendable.

Major changes included:
- ExtendedType notion which isolates much of the messy dealing with reflection 
stuff
- DocumentValue which provides an extensible and OO driven way of reading and 
writing values
- BeanProperty which abstracts field and method property access

Embedded property support is included.

Some undocumented hacks have also been removed.

 Allow customizable bean mapping for QueryResponse.getBeans(..)
 --

 Key: SOLR-2708
 URL: https://issues.apache.org/jira/browse/SOLR-2708
 Project: Solr
  Issue Type: Improvement
  Components: clients - java
Affects Versions: 1.4, 3.1
Reporter: Bozhidar Bozhanov
 Attachments: SOLR-2708-beanProperty-valueBinder.patch, 
 SOLR-2708-beanProperty.patch, SOLR-2708.patch, SOLR-2708.patch, 
 SOLR-2708.patch, SOLR-2708.patch


 The mechanism for getting beans is rather limited - only classes 
 @Field-annotated fields.
 Imaging the following subprojects:
 - common
 - search
 And you want to reuse a class from common as a result from a solr search. You 
 should either duplicate the structure or make common depend on solrj. Neither 
 are desirable.
 So, my suggestion:
 - introduce a pluggable mechanism for bean resolution. Currently it is 
 impossible - it uses private methods and private inner classes. (This will be 
 useful for custom conversions, because the existing one fails in some cases 
 where BeanUtils.copyProperties works.)
 - allow externalized (xml) configuration
 - allow detecting all fields, annotated or not (off by default)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-2708) Allow customizable bean mapping for QueryResponse.getBeans(..)

2011-08-21 Thread Chris Male (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Male updated SOLR-2708:
-

Attachment: SOLR-2708-beanProperty-valueBinder.patch

New patch with big changes:

- Introduces the idea of ValueBinder, ValueReader, ValueWriter and 
ValueBinderFactory.  These decouple the logic of reading and writing values for 
different property types.
- Moves most of the type parsing logic into DefaultValueBinderFactory which 
provides an extensible API if people want to change how certain types are 
handled.
- Provides implementations for ValueReader and ValueWriter which emulate the 
current behavior.
- Cleans out DocField so it uses ValueBinder.
- Documentation is improved
- Drops bizarre handling of byte[] and ByteBuffer.  I'll document this change 
but it isn't actually documented anywhere that its even supported now.  Its 
possible to add this back in through the extension points.

It'd be great if someone could review this.  I'm looking to commit it sometime 
this coming week.

 Allow customizable bean mapping for QueryResponse.getBeans(..)
 --

 Key: SOLR-2708
 URL: https://issues.apache.org/jira/browse/SOLR-2708
 Project: Solr
  Issue Type: Improvement
  Components: clients - java
Affects Versions: 1.4, 3.1
Reporter: Bozhidar Bozhanov
 Attachments: SOLR-2708-beanProperty-valueBinder.patch, 
 SOLR-2708-beanProperty.patch, SOLR-2708.patch, SOLR-2708.patch, 
 SOLR-2708.patch


 The mechanism for getting beans is rather limited - only classes 
 @Field-annotated fields.
 Imaging the following subprojects:
 - common
 - search
 And you want to reuse a class from common as a result from a solr search. You 
 should either duplicate the structure or make common depend on solrj. Neither 
 are desirable.
 So, my suggestion:
 - introduce a pluggable mechanism for bean resolution. Currently it is 
 impossible - it uses private methods and private inner classes. (This will be 
 useful for custom conversions, because the existing one fails in some cases 
 where BeanUtils.copyProperties works.)
 - allow externalized (xml) configuration
 - allow detecting all fields, annotated or not (off by default)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-2708) Allow customizable bean mapping for QueryResponse.getBeans(..)

2011-08-20 Thread Chris Male (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Male updated SOLR-2708:
-

Attachment: SOLR-2708-beanProperty.patch

Patch which adds the notion of a BeanProperty which handles the reading and 
writing of a bean's property.  

This cleans up the code in DocField while also allowing extensions to the 
accessing of a properties values.

Also adds two extendable methods, isBeanProperty(Method) and 
isBeanProperty(Field), which by default implement the current behavior, but 
allow extensions to what fields / methods are of interest (such as choosing all 
fields).

 Allow customizable bean mapping for QueryResponse.getBeans(..)
 --

 Key: SOLR-2708
 URL: https://issues.apache.org/jira/browse/SOLR-2708
 Project: Solr
  Issue Type: Improvement
  Components: clients - java
Affects Versions: 1.4, 3.1
Reporter: Bozhidar Bozhanov
 Attachments: SOLR-2708-beanProperty.patch, SOLR-2708.patch, 
 SOLR-2708.patch, SOLR-2708.patch


 The mechanism for getting beans is rather limited - only classes 
 @Field-annotated fields.
 Imaging the following subprojects:
 - common
 - search
 And you want to reuse a class from common as a result from a solr search. You 
 should either duplicate the structure or make common depend on solrj. Neither 
 are desirable.
 So, my suggestion:
 - introduce a pluggable mechanism for bean resolution. Currently it is 
 impossible - it uses private methods and private inner classes. (This will be 
 useful for custom conversions, because the existing one fails in some cases 
 where BeanUtils.copyProperties works.)
 - allow externalized (xml) configuration
 - allow detecting all fields, annotated or not (off by default)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-2708) Allow customizable bean mapping for QueryResponse.getBeans(..)

2011-08-18 Thread Chris Male (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Male updated SOLR-2708:
-

Attachment: SOLR-2708.patch

Cleaning up further.

 Allow customizable bean mapping for QueryResponse.getBeans(..)
 --

 Key: SOLR-2708
 URL: https://issues.apache.org/jira/browse/SOLR-2708
 Project: Solr
  Issue Type: Improvement
  Components: clients - java
Affects Versions: 1.4, 3.1
Reporter: Bozhidar Bozhanov
 Attachments: SOLR-2708.patch, SOLR-2708.patch, SOLR-2708.patch


 The mechanism for getting beans is rather limited - only classes 
 @Field-annotated fields.
 Imaging the following subprojects:
 - common
 - search
 And you want to reuse a class from common as a result from a solr search. You 
 should either duplicate the structure or make common depend on solrj. Neither 
 are desirable.
 So, my suggestion:
 - introduce a pluggable mechanism for bean resolution. Currently it is 
 impossible - it uses private methods and private inner classes. (This will be 
 useful for custom conversions, because the existing one fails in some cases 
 where BeanUtils.copyProperties works.)
 - allow externalized (xml) configuration
 - allow detecting all fields, annotated or not (off by default)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-2708) Allow customizable bean mapping for QueryResponse.getBeans(..)

2011-08-17 Thread Chris Male (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Male updated SOLR-2708:
-

Attachment: SOLR-2708.patch

Another patch doing more cleanup, particularly in the tests.

I'm starting to get an idea of whats needed here.

 Allow customizable bean mapping for QueryResponse.getBeans(..)
 --

 Key: SOLR-2708
 URL: https://issues.apache.org/jira/browse/SOLR-2708
 Project: Solr
  Issue Type: Improvement
  Components: clients - java
Affects Versions: 1.4, 3.1
Reporter: Bozhidar Bozhanov
 Attachments: SOLR-2708.patch, SOLR-2708.patch


 The mechanism for getting beans is rather limited - only classes 
 @Field-annotated fields.
 Imaging the following subprojects:
 - common
 - search
 And you want to reuse a class from common as a result from a solr search. You 
 should either duplicate the structure or make common depend on solrj. Neither 
 are desirable.
 So, my suggestion:
 - introduce a pluggable mechanism for bean resolution. Currently it is 
 impossible - it uses private methods and private inner classes. (This will be 
 useful for custom conversions, because the existing one fails in some cases 
 where BeanUtils.copyProperties works.)
 - allow externalized (xml) configuration
 - allow detecting all fields, annotated or not (off by default)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-2708) Allow customizable bean mapping for QueryResponse.getBeans(..)

2011-08-16 Thread Chris Male (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Male updated SOLR-2708:
-

Attachment: SOLR-2708.patch

First step, preliminary cleanup of the codebase so I can see whats going on.

 Allow customizable bean mapping for QueryResponse.getBeans(..)
 --

 Key: SOLR-2708
 URL: https://issues.apache.org/jira/browse/SOLR-2708
 Project: Solr
  Issue Type: Improvement
  Components: clients - java
Affects Versions: 1.4, 3.1
Reporter: Bozhidar Bozhanov
 Attachments: SOLR-2708.patch


 The mechanism for getting beans is rather limited - only classes 
 @Field-annotated fields.
 Imaging the following subprojects:
 - common
 - search
 And you want to reuse a class from common as a result from a solr search. You 
 should either duplicate the structure or make common depend on solrj. Neither 
 are desirable.
 So, my suggestion:
 - introduce a pluggable mechanism for bean resolution. Currently it is 
 impossible - it uses private methods and private inner classes. (This will be 
 useful for custom conversions, because the existing one fails in some cases 
 where BeanUtils.copyProperties works.)
 - allow externalized (xml) configuration
 - allow detecting all fields, annotated or not (off by default)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org