// This is repository interface
public interface AccountTypeRepository extends JpaRepository<AccountType, Long> {
AccountType findByOptionStartsWithIgnoreCase(String option);
List findByAccountTypeNameStartsWithIgnoreCase(String accountTypeName);
}
// this is vaadin design class
public class AccountTypeViewDesign2 extends HorizontalLayout {
protected Label lblAccountType1;
protected TextField txtAccountType1;
protected Label lblAccountTypeCode1;
protected TextField txtGroupCode1;
protected Button btnCancel;
protected Button btnUpdate;
protected Button btnAddAccountType1;
protected TextField filter; protected Grid grid;
public AccountTypeViewDesign2() {
Design.read(this);
}
}
//this is view class
public class AccountTypeView extends AccountTypeViewDesign2 implements View{
private static final long serialVersionUID = 1L;
public static final String VIEW_NAME = “accounttype”;
@Override
public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) {
}
//this is ui class
@Theme(“mytheme”)
@SpringUI(path=“/accounttype”)
public class AccountTypeUI extends UI{
@Override
protected void init(VaadinRequest request) {
setContent(new AccountTypeViewDesign2());
}