Skip to content

Instantly share code, notes, and snippets.

@JetForMe
Created October 21, 2016 00:48
Show Gist options
  • Save JetForMe/ef7a3510620b792d155aa0cf747c442a to your computer and use it in GitHub Desktop.
Save JetForMe/ef7a3510620b792d155aa0cf747c442a to your computer and use it in GitHub Desktop.
Simplified User and Vault
@Service("/User")
public
interface
UserVault extends Vault<IdAsset, User>
{
void
create(HOASession.UserRegistrationForm inForm,
Result<IdAsset> ioResult);
void
findByLogin(String inLogin, Result<User> ioResult);
}
@Asset
@Api
public
class
User
{
public
User()
{
sLogger.info("User() called");
}
@Override
@Modify
public
void
create(HOASession.UserRegistrationForm inForm,
Result<IdAsset> ioResult)
{
sLogger.info("User.create() called");
...
}
@Id
private IdAsset id;
private String first;
private String last;
private String email;
private String login;
private String encryptedPassword;
private Date createDate;
private static final Logger sLogger = Logger.getLogger(User.class.getName());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment