/** * Create an instance of {@link SecurityRoleKey } * */ public SecurityRoleKey createSecurityRoleKey() { return new SecurityRoleKey(); }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theSecurityRoleName; theSecurityRoleName = this.getSecurityRoleName(); strategy.appendField(locator, this, "securityRoleName", buffer, theSecurityRoleName, (this.securityRoleName!= null)); } return buffer; }
/** * Validates a security role key. This method also trims the key parameters. * * @param securityRoleKey the security role key */ public void validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey) { Assert.notNull(securityRoleKey, "A security role key must be specified."); securityRoleKey.setSecurityRoleName(alternateKeyHelper.validateStringParameter("security role name", securityRoleKey.getSecurityRoleName())); } }
public Object clone() { return copyTo(createNewInstance()); }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof SecurityRoleKey) { final SecurityRoleKey copy = ((SecurityRoleKey) draftCopy); { Boolean securityRoleNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.securityRoleName!= null)); if (securityRoleNameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceSecurityRoleName; sourceSecurityRoleName = this.getSecurityRoleName(); String copySecurityRoleName = ((String) strategy.copy(LocatorUtils.property(locator, "securityRoleName", sourceSecurityRoleName), sourceSecurityRoleName, (this.securityRoleName!= null))); copy.setSecurityRoleName(copySecurityRoleName); } else { if (securityRoleNameShouldBeCopiedAndSet == Boolean.FALSE) { copy.securityRoleName = null; } } } } return draftCopy; }
@Test public void testGetSecurityRoleKeys() { // Create a list of security role keys. final List<SecurityRoleKey> securityRoleKeys = ImmutableList.of(new SecurityRoleKey(SECURITY_ROLE), new SecurityRoleKey(SECURITY_ROLE_2)); // Create and persist security role entities in reverse order. for (SecurityRoleKey securityRoleKey : Lists.reverse(securityRoleKeys)) { securityRoleDaoTestHelper.createSecurityRoleEntity(securityRoleKey.getSecurityRoleName()); } // Get all security roles registered in the system. List<SecurityRoleKey> result = securityRoleDao.getSecurityRoleKeys(); // Validate the returned object. assertEquals(securityRoleKeys, result); } }
public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); }
public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof SecurityRoleKey) { final SecurityRoleKey copy = ((SecurityRoleKey) draftCopy); { Boolean securityRoleNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.securityRoleName!= null)); if (securityRoleNameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceSecurityRoleName; sourceSecurityRoleName = this.getSecurityRoleName(); String copySecurityRoleName = ((String) strategy.copy(LocatorUtils.property(locator, "securityRoleName", sourceSecurityRoleName), sourceSecurityRoleName, (this.securityRoleName!= null))); copy.setSecurityRoleName(copySecurityRoleName); } else { if (securityRoleNameShouldBeCopiedAndSet == Boolean.FALSE) { copy.securityRoleName = null; } } } } return draftCopy; }
public Object clone() { return copyTo(createNewInstance()); }
public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); }
public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
/** * Create an instance of {@link SecurityRoleKey } * */ public SecurityRoleKey createSecurityRoleKey() { return new SecurityRoleKey(); }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof SecurityRoleKey) { final SecurityRoleKey copy = ((SecurityRoleKey) draftCopy); { Boolean securityRoleNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.securityRoleName!= null)); if (securityRoleNameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceSecurityRoleName; sourceSecurityRoleName = this.getSecurityRoleName(); String copySecurityRoleName = ((String) strategy.copy(LocatorUtils.property(locator, "securityRoleName", sourceSecurityRoleName), sourceSecurityRoleName, (this.securityRoleName!= null))); copy.setSecurityRoleName(copySecurityRoleName); } else { if (securityRoleNameShouldBeCopiedAndSet == Boolean.FALSE) { copy.securityRoleName = null; } } } } return draftCopy; }
/** * Validates and trims the security role key * * @param securityRoleKey securityRoleKey * * @return security role validated and trimmed */ private String validateSecurityRoleKey(SecurityRoleKey securityRoleKey) { Assert.notNull(securityRoleKey, "A security role key must be specified."); return alternateKeyHelper.validateStringParameter("security role name", securityRoleKey.getSecurityRoleName()); }
/** * Validates a security role key. This method also trims the key parameters. * * @param securityRoleKey the security role key */ public void validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey) { Assert.notNull(securityRoleKey, "A security role key must be specified."); securityRoleKey.setSecurityRoleName(alternateKeyHelper.validateStringParameter("security role name", securityRoleKey.getSecurityRoleName())); } }