use of com.github.yukihane.hibernateissues.qiita20180224.entity.User in project hello-java by yukihane.
the class Qiita20180224ApplicationTests method contextLoads.
@Test
public void contextLoads() {
User user = new User();
user.setUserNo("no_01");
Order order = new Order();
User savedUser = repository.save(user);
savedUser.setOrders(Arrays.asList(order));
}
use of com.github.yukihane.hibernateissues.qiita20180224.entity.User in project jpa by xnat9.
the class JpaTest method testHqlRows2.
@Test
void testHqlRows2() {
try (Repo repo = new Repo("jdbc:mysql://localhost:3306/mysql?useSSL=false&user=root&password=root&allowPublicKeyRetrieval=true").entities(User.class).init()) {
List<Map> records = repo.hqlRows("select new map(Host as host,User as user) from User where User=:user", Map.class, "root");
log.info(records.toString());
}
}
use of com.github.yukihane.hibernateissues.qiita20180224.entity.User in project jpa by xnat9.
the class JpaTest method testHqlFirstRow3.
@Test
void testHqlFirstRow3() {
try (Repo repo = new Repo("jdbc:mysql://localhost:3306/mysql?useSSL=false&user=root&password=root&allowPublicKeyRetrieval=true").entities(User.class).init()) {
User user = repo.hqlRow("select new entity.User(Host,User) from User where User=:user", User.class, "root");
log.info(user == null ? "" : user.toString());
}
}
use of com.github.yukihane.hibernateissues.qiita20180224.entity.User in project jmix-docs by Haulmont.
the class SendEmailJavaDelegate method execute.
@Override
public void execute(DelegateExecution execution) {
// <2>
// <3>
User addresseeValue = (User) addressee.getValue(execution);
String emailSubjectValue = (String) emailSubject.getValue(execution);
String emailBodyValue = (String) emailBody.getValue(execution);
EmailInfo emailInfo = // <4>
EmailInfoBuilder.create().setAddresses(addresseeValue.getEmail()).setSubject(emailSubjectValue).setFrom(null).setBody(emailBodyValue).build();
// <5>
emailer.sendEmailAsync(emailInfo);
}
use of com.github.yukihane.hibernateissues.qiita20180224.entity.User in project jmix-docs by Haulmont.
the class TaskAssignedNotificationSender method onOtherProcessTaskAssigned.
// end::event-listener-1[]
// tag::specific-process-1[]
@EventListener
protected void onOtherProcessTaskAssigned(UserTaskAssignedEvent event) {
if ("order-approval".equals(event.getProcessDefinition().getKey())) {
// ...
// end::specific-process-1[]
User user = dataManager.load(User.class).query("select u from smpl_User u where u.username = " + ":username").parameter("username", event.getUsername()).one();
Task task = event.getTask();
String emailTitle = "New process task " + task.getName();
String emailBody = "Hi " + user.getFirstName() + "\n" + "The task" + task.getName() + "has been assigned.";
EmailInfo emailInfo = EmailInfoBuilder.create().setAddresses(user.getEmail()).setSubject(emailTitle).setFrom(null).setBody(emailBody).build();
emailer.sendEmailAsync(emailInfo);
// tag::specific-process-2[]
}
}
Aggregations