ChromatticSession session = ctx.getSession();
return session.getEmbedded(o, type);
}
protected final QueryResult<TokenEntry> findTokensOfUser(String user) {
SessionContext ctx = chromatticLifeCycle.getContext();
ChromatticSession session = ctx.getSession();
TokenContainer tokenContainer = getTokenContainer();
String statement = new StringBuilder(128).append("jcr:path LIKE '").append(session.getPath(tokenContainer))
.append("/%'").append(" AND username='").append(Utils.queryEscape(user)).append("'").toString();
return session.createQueryBuilder(TokenEntry.class).where(statement).get().objects();