Package com.impetus.kundera.metadata.model

Examples of com.impetus.kundera.metadata.model.PropertyIndex


    {
        String indexName = metadata.getIndexName();
        Map<String, PropertyIndex> indexProperties = metadata.getIndexProperties();
        for (String columnName : indexProperties.keySet())
        {
            PropertyIndex index = indexProperties.get(columnName);
            java.lang.reflect.Field property = index.getProperty();
            String propertyName = index.getName();
            addFieldToDocument(entity, document, property, propertyName, indexName);
        }

        if (metaModel.isEmbeddable(metadata.getIdAttribute().getBindableJavaType()))
        {
View Full Code Here


                    Map<String, PropertyIndex> indexProperties = metadata.getIndexProperties();
                    Map<String, Object> indexCollection = new HashMap<String, Object>();
                    Object id = PropertyAccessorHelper.getId(entity, metadata);
                    for (String columnName : indexProperties.keySet())
                    {
                        PropertyIndex index = indexProperties.get(columnName);
                        Field property = index.getProperty();
                        // String propertyName = index.getName();
                        Object obj = PropertyAccessorHelper.getObject(entity, property);
                        indexCollection.put(columnName, obj);
                    }
View Full Code Here

     * @return TODO: Make this method accept n number of parameters elegantly
     */
    private static PropertyIndex populatePropertyIndex(String indexName, String indexType, Integer max, Integer min,
            Field f)
    {
        PropertyIndex pi = new PropertyIndex(f, indexName, indexType);

        pi.setMax(max);
        pi.setMin(min);

        return pi;
    }
View Full Code Here

    @Test
    public void testPropertyIndex()
    {
        try
        {
            PropertyIndex pi = new PropertyIndex(Employe.class.getDeclaredField("empName"), "EMP_NAME", "ASC");
            pi.setBoost(1.2f);
           
            Assert.assertEquals(1.2f, pi.getBoost());
            Assert.assertEquals("ASC", pi.getIndexType());           
        }
        catch (SecurityException e)
        {
           
            Assert.fail(e.getMessage());
View Full Code Here

TOP

Related Classes of com.impetus.kundera.metadata.model.PropertyIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.