Examples of PersonPropertyImpl


Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

    }


    @Test
    public void convertValid() {
        PersonProperty template = new PersonPropertyImpl("42");
        template.setType("TEST_A");
        template.setValue("TEST_B");
        template.setQualifier("TEST_C");
        template.setExtendedValue("TEST_D");
        template.setPrimary(true);

        JpaPersonProperty jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaPersonProperty.class)));
        assertThat(jpaTemplate.getId(), is(equalTo(template.getId())));
        assertThat(jpaTemplate.getType(), is(equalTo(template.getType())));
        assertThat(jpaTemplate.getValue(), is(equalTo(template.getValue())));
        assertThat(jpaTemplate.getQualifier(), is(equalTo(template.getQualifier())));
        assertThat(jpaTemplate.getExtendedValue(), is(equalTo(template.getExtendedValue())));
        assertThat(jpaTemplate.getPrimary(), is(equalTo(template.getPrimary())));
       
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

    private org.apache.rave.model.Person getDbPerson(String id) {
        PersonImpl dbPerson = new PersonImpl();
        dbPerson.setUsername(id);
        dbPerson.setDisplayName(DISPLAY_NAME);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl("1", Person.Field.TAGS.toString(), TAG, null, null, null));
        properties.add(new PersonPropertyImpl("2", Person.Field.HAPPIEST_WHEN.toString(), HAPPIEST_WHEN, null, null, null));
        dbPerson.setProperties(properties);
        return dbPerson;
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

        person.setHonorificPrefix(PREFIX);
        person.setHonorificSuffix(SUFFIX);
        person.setPreferredName(PREFERRED_NAME);
        person.setStatus(STATUS);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl("1", "gender", Person.Gender.female.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "drinker", Drinker.HEAVILY.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "age", AGE.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "birthday", BIRTHDAY_STRING, null, "", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", BODY_BUILD, null, "build", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", BODY_EYE_COLOR, null, "eyeColor", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", "25.24", null, "height", false));
        properties.add(new PersonPropertyImpl("1", "ims", IM_1, null, IM_PROVIDER_1, true));
        properties.add(new PersonPropertyImpl("1", "ims", IM_2, null, IM_PROVIDER_2, false));
        properties.add(new PersonPropertyImpl("1", "emails", E_MAIL_ADDRESS_2, null, "personal", false));
        properties.add(new PersonPropertyImpl("1", "emails", E_MAIL_ADDRESS_3, null, "junk", true));
        properties.add(new PersonPropertyImpl("1", "activities", ACTIVITY_1, null, "", false));
        properties.add(new PersonPropertyImpl("1", "activities", ACTIVITY_2, null, "", false));
        properties.add(new PersonPropertyImpl("1", "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl("1", "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl("1", "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl("1", "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

        }
        return null;
    }

    private PersonProperty convert(PersonProperty source) {
        PersonProperty converted = new PersonPropertyImpl();
        converted.setType(source.getType());
        converted.setValue(source.getValue());
        converted.setExtendedValue(source.getExtendedValue());
        converted.setQualifier(source.getQualifier());
        converted.setPrimary(source.getPrimary());
        return converted;
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

    }


    @Test
    public void convertValid() {
        PersonProperty template = new PersonPropertyImpl();
        template.setId(42L);
        template.setType("TEST_A");
        template.setValue("TEST_B");
        template.setQualifier("TEST_C");
        template.setExtendedValue("TEST_D");
        template.setPrimary(true);

        JpaPersonProperty jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaPersonProperty.class)));
        assertThat(jpaTemplate.getId(), is(equalTo(template.getId())));
        assertThat(jpaTemplate.getType(), is(equalTo(template.getType())));
        assertThat(jpaTemplate.getValue(), is(equalTo(template.getValue())));
        assertThat(jpaTemplate.getQualifier(), is(equalTo(template.getQualifier())));
        assertThat(jpaTemplate.getExtendedValue(), is(equalTo(template.getExtendedValue())));
        assertThat(jpaTemplate.getPrimary(), is(equalTo(template.getPrimary())));
       
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

    private org.apache.rave.portal.model.Person getDbPerson(String id) {
        PersonImpl dbPerson = new PersonImpl();
        dbPerson.setUsername(id);
        dbPerson.setDisplayName(DISPLAY_NAME);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl(1L, Person.Field.TAGS.toString(), TAG, null, null, null));
        properties.add(new PersonPropertyImpl(2L, Person.Field.HAPPIEST_WHEN.toString(), HAPPIEST_WHEN, null, null, null));
        dbPerson.setProperties(properties);
        return dbPerson;
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

        person.setHonorificPrefix(PREFIX);
        person.setHonorificSuffix(SUFFIX);
        person.setPreferredName(PREFERRED_NAME);
        person.setStatus(STATUS);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl(1L, "gender", Person.Gender.female.toString(), null, "", false));
        properties.add(new PersonPropertyImpl(1L, "drinker", Drinker.HEAVILY.toString(), null, "", false));
        properties.add(new PersonPropertyImpl(1L, "age", AGE.toString(), null, "", false));
        properties.add(new PersonPropertyImpl(1L, "birthday", BIRTHDAY_STRING, null, "", false));
        properties.add(new PersonPropertyImpl(1L, "bodyType", BODY_BUILD, null, "build", false));
        properties.add(new PersonPropertyImpl(1L, "bodyType", BODY_EYE_COLOR, null, "eyeColor", false));
        properties.add(new PersonPropertyImpl(1L, "bodyType", "25.24", null, "height", false));
        properties.add(new PersonPropertyImpl(1L, "ims", IM_1, null, IM_PROVIDER_1, true));
        properties.add(new PersonPropertyImpl(1L, "ims", IM_2, null, IM_PROVIDER_2, false));
        properties.add(new PersonPropertyImpl(1L, "emails", E_MAIL_ADDRESS_2, null, "personal", false));
        properties.add(new PersonPropertyImpl(1L, "emails", E_MAIL_ADDRESS_3, null, "junk", true));
        properties.add(new PersonPropertyImpl(1L, "activities", ACTIVITY_1, null, "", false));
        properties.add(new PersonPropertyImpl(1L, "activities", ACTIVITY_2, null, "", false));
        properties.add(new PersonPropertyImpl(1L, "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl(1L, "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl(1L, "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl(1L, "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.portal.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

    }


    @Test
    public void convertValid() {
        PersonProperty template = new PersonPropertyImpl("42");
        template.setType("TEST_A");
        template.setValue("TEST_B");
        template.setQualifier("TEST_C");
        template.setExtendedValue("TEST_D");
        template.setPrimary(true);

        JpaPersonProperty jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaPersonProperty.class)));
        assertThat(jpaTemplate.getId(), is(equalTo(template.getId())));
        assertThat(jpaTemplate.getType(), is(equalTo(template.getType())));
        assertThat(jpaTemplate.getValue(), is(equalTo(template.getValue())));
        assertThat(jpaTemplate.getQualifier(), is(equalTo(template.getQualifier())));
        assertThat(jpaTemplate.getExtendedValue(), is(equalTo(template.getExtendedValue())));
        assertThat(jpaTemplate.getPrimary(), is(equalTo(template.getPrimary())));
       
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

        person.setHonorificPrefix(PREFIX);
        person.setHonorificSuffix(SUFFIX);
        person.setPreferredName(PREFERRED_NAME);
        person.setStatus(STATUS);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl("1", "gender", Person.Gender.female.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "drinker", Drinker.HEAVILY.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "age", AGE.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "birthday", BIRTHDAY_STRING, null, "", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", BODY_BUILD, null, "build", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", BODY_EYE_COLOR, null, "eyeColor", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", "25.24", null, "height", false));
        properties.add(new PersonPropertyImpl("1", "ims", IM_1, null, IM_PROVIDER_1, true));
        properties.add(new PersonPropertyImpl("1", "ims", IM_2, null, IM_PROVIDER_2, false));
        properties.add(new PersonPropertyImpl("1", "emails", E_MAIL_ADDRESS_2, null, "personal", false));
        properties.add(new PersonPropertyImpl("1", "emails", E_MAIL_ADDRESS_3, null, "junk", true));
        properties.add(new PersonPropertyImpl("1", "activities", ACTIVITY_1, null, "", false));
        properties.add(new PersonPropertyImpl("1", "activities", ACTIVITY_2, null, "", false));
        properties.add(new PersonPropertyImpl("1", "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl("1", "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl("1", "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl("1", "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.portal.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PersonPropertyImpl

    private org.apache.rave.portal.model.Person getDbPerson(String id) {
        PersonImpl dbPerson = new PersonImpl();
        dbPerson.setUsername(id);
        dbPerson.setDisplayName(DISPLAY_NAME);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl("1", Person.Field.TAGS.toString(), TAG, null, null, null));
        properties.add(new PersonPropertyImpl("2", Person.Field.HAPPIEST_WHEN.toString(), HAPPIEST_WHEN, null, null, null));
        dbPerson.setProperties(properties);
        return dbPerson;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.