@Test public void testRemoveProperty() { assertTrue(propertyList.getPropertyNames().contains("fullName")); assertTrue(propertyList.removeProperty("fullName")); assertFalse(propertyList.getPropertyNames().contains("fullName")); assertTrue(propertyList.getAllAvailablePropertyNames().contains( "fullName")); assertTrue(propertyList.getPropertyNames().contains("firstName")); assertTrue(propertyList.getPersistentPropertyNames().contains( "firstName")); assertEquals("firstName", propertyList.getSortablePropertyMap().get("firstName")); assertTrue(propertyList.removeProperty("firstName")); assertFalse(propertyList.getPropertyNames().contains("firstName")); assertFalse(propertyList.getPersistentPropertyNames().contains( "firstName")); assertFalse(propertyList.getSortablePropertyMap().containsKey( "firstName")); assertTrue(propertyList.getAllAvailablePropertyNames().contains( "firstName")); assertFalse(propertyList.removeProperty("nonexistent")); assertEquals(propertyList.getAllAvailablePropertyNames(), childPropertyList.getAllAvailablePropertyNames()); assertEquals(propertyList.getNestedPropertyNames(), childPropertyList.getNestedPropertyNames()); assertEquals(propertyList.getPropertyNames(), childPropertyList.getPropertyNames()); assertEquals(propertyList.getPersistentPropertyNames(), childPropertyList.getPersistentPropertyNames()); assertEquals(propertyList.getSortablePropertyMap(), childPropertyList.getSortablePropertyMap()); assertTrue(childPropertyList.getPropertyNames().contains("lastName")); assertFalse(childPropertyList.removeProperty("lastName")); assertTrue(childPropertyList.getPropertyNames().contains("lastName")); }
public boolean removeProperty(String propertyName) { assert propertyName != null : "propertyName must not be null"; boolean result = propertyNames.remove(propertyName); persistentPropertyNames.remove(propertyName); sortablePropertyMap.remove(propertyName); if (nestedPropertyNames.remove(propertyName)) { allPropertyNames.remove(propertyName); } return result; }
PropertyList implements Serializable { public boolean removeProperty(String propertyName) { assert propertyName != null : "propertyName must not be null"; boolean result = propertyNames.remove(propertyName); persistentPropertyNames.remove(propertyName); sortablePropertyMap.remove(propertyName); if (nestedPropertyNames.remove(propertyName)) { allPropertyNames.remove(propertyName); } return result; } }
PropertyList implements Serializable { public boolean removeProperty(String propertyName) { assert propertyName != null : "propertyName must not be null"; boolean result = propertyNames.remove(propertyName); persistentPropertyNames.remove(propertyName); sortablePropertyMap.remove(propertyName); if (nestedPropertyNames.remove(propertyName)) { allPropertyNames.remove(propertyName); } return result; } PropertyList(ClassMetadata<T> metadata);  PropertyList(PropertyList<T> parentList); }
PropertyList implements Serializable { public boolean removeProperty(String propertyName) { assert propertyName != null : "propertyName must not be null"; boolean result = propertyNames.remove(propertyName); persistentPropertyNames.remove(propertyName); sortablePropertyMap.remove(propertyName); if (nestedPropertyNames.remove(propertyName)) { allPropertyNames.remove(propertyName); } return result; } PropertyList(ClassMetadata<T> metadata);  PropertyList(PropertyList<T> parentList); ClassMetadata<T> getClassMetadata(); PropertyList<T> getParentList(); void setSortProperty(String propertyName, String sortPropertyName); void addNestedProperty(String propertyName); boolean removeProperty(String propertyName); Set<String> getAllAvailablePropertyNames(); Set<String> getPropertyNames(); Set<String> getPersistentPropertyNames(); Map<String, String> getSortablePropertyMap(); Set<String> getNestedPropertyNames(); Class<?> getPropertyType(String propertyName); boolean isPropertyWritable(String propertyName); Object getPropertyValue(T object, String propertyName); void setPropertyValue(T object, String propertyName,
            Object propertyValue); PropertyKind getPropertyKind(String propertyName); boolean isPropertyLazyLoaded(String propertyName); }
PropertyList implements Serializable { public boolean removeProperty(String propertyName) { assert propertyName != null : "propertyName must not be null"; boolean result = propertyNames.remove(propertyName); persistentPropertyNames.remove(propertyName); sortablePropertyMap.remove(propertyName); if (nestedPropertyNames.remove(propertyName)) { allPropertyNames.remove(propertyName); } return result; } PropertyList(ClassMetadata<T> metadata);  PropertyList(PropertyList<T> parentList); ClassMetadata<T> getClassMetadata(); PropertyList<T> getParentList(); void setSortProperty(String propertyName, String sortPropertyName); void addNestedProperty(String propertyName); boolean removeProperty(String propertyName); Set<String> getAllAvailablePropertyNames(); Set<String> getPropertyNames(); Set<String> getPersistentPropertyNames(); Map<String, String> getSortablePropertyMap(); Set<String> getNestedPropertyNames(); Class<?> getPropertyType(String propertyName); boolean isPropertyWritable(String propertyName); Object getPropertyValue(T object, String propertyName); void setPropertyValue(T object, String propertyName,
            Object propertyValue); PropertyKind getPropertyKind(String propertyName); boolean isPropertyLazyLoaded(String propertyName);  }