From efb578d87e586bf87fdbca8e52bbcc0fd39a82ba Mon Sep 17 00:00:00 2001 From: shameem_z Date: Mon, 29 Oct 2007 12:46:06 +0000 Subject: [PATCH] Refactoring of Create Client/U_WebMenu in Posterita --- .../main/org/posterita/model/U_RoleMenu.java | 38 ++++++ .../main/org/posterita/model/U_WebMenu.java | 123 ++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 posterita/src/main/org/posterita/model/U_RoleMenu.java create mode 100644 posterita/src/main/org/posterita/model/U_WebMenu.java diff --git a/posterita/src/main/org/posterita/model/U_RoleMenu.java b/posterita/src/main/org/posterita/model/U_RoleMenu.java new file mode 100644 index 0000000000..6c27130c1d --- /dev/null +++ b/posterita/src/main/org/posterita/model/U_RoleMenu.java @@ -0,0 +1,38 @@ +/** + * Product: Posterita Web-Based POS and Adempiere Plugin + * Copyright (C) 2007 Posterita Ltd + * This file is part of POSterita + * + * POSterita is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +package org.posterita.model; + +import org.compiere.model.X_U_RoleMenu; + + +public class U_RoleMenu extends UDIPO +{ + + public U_RoleMenu(X_U_RoleMenu po) + { + super(po); + } + + public X_U_RoleMenu getX_U_RoleMenu() + { + return (X_U_RoleMenu) getPO(); + } + +} diff --git a/posterita/src/main/org/posterita/model/U_WebMenu.java b/posterita/src/main/org/posterita/model/U_WebMenu.java new file mode 100644 index 0000000000..6237fcc5aa --- /dev/null +++ b/posterita/src/main/org/posterita/model/U_WebMenu.java @@ -0,0 +1,123 @@ +/** + * Product: Posterita Web-Based POS and Adempiere Plugin + * Copyright (C) 2007 Posterita Ltd + * This file is part of POSterita + * + * POSterita is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +package org.posterita.model; + +import org.compiere.model.X_U_WebMenu; +import org.posterita.exceptions.OperationException; + + +public class U_WebMenu extends UDIPO +{ + public U_WebMenu(X_U_WebMenu menu) + { + super(menu); + } + + public String getImageLink() + { + return getMenu().getImageLink(); + } + + public X_U_WebMenu getMenu() + { + return (X_U_WebMenu) getPO(); + } + + public int getMenuId() + { + return getMenu().get_ID(); + } + + public String getMenuLink() + { + return getMenu().getMenuLink(); + } + + public String getModule() + { + return getMenu().getModule(); + } + + public String getName() + { + return getMenu().getName(); + } + + public int getParentMenuId() + { + return getMenu().getParentMenu_ID(); + } + + public String getPosition() + { + return getMenu().getPosition(); + } + + public boolean isActive() + { + return getMenu().isActive(); + } + + public void setActive(boolean isActive) + { + getMenu().setIsActive(isActive); + } + + public void setImageLink(String imageLink) + { + getMenu().setImageLink(imageLink); + } + + public void setParentMenuId(int parentMenuId) + { + getMenu().setParentMenu_ID(parentMenuId); + } + + public void setPosition(String position) + { + getMenu().setPosition(position); + } + + public String getDescription() + { + return getMenu().getDescription(); + } + + public String getCategory() + { + return getMenu().getCategory(); + } + + public void setCategory(String category) + { + getMenu().setCategory(category); + } + + public void setName(String name) + { + getMenu().setName(name); + } + + public void save() throws OperationException + { + super.save(); + } + +}