-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pronto, faltando apenas testar todas as funcionalidades
- Loading branch information
Showing
69 changed files
with
6,274 additions
and
6,147 deletions.
There are no files selected for viewing
82 changes: 44 additions & 38 deletions
82
osms/.metadata/src/main/webapp/WEB-INF/faces-config.pageflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<pageflow:Pageflow xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pageflow="http://www.sybase.com/suade/pageflow" id="pf14039799391390" configfile="/osms/src/main/webapp/WEB-INF/faces-config.xml"> | ||
<nodes xsi:type="pageflow:PFPage" name="*" x="122" y="1330" id="pf14039801282151" referenceLink="//@navigationRule.15/@fromViewId|" outlinks="pf14039801282162 pf14039801282163 pf14039801282164 pf14039801282165 pf14039801282166 pf14039801282168 pf14041817524422 pf14041817766164 pf14046779002830 pf14047032799470 pf14071001435966 pf14071001435967 pf14071001435968 pf14071172732593 pf14072005982965 pf14072006391267 pf14072006391268" path="*"/> | ||
<nodes xsi:type="pageflow:PFPage" name="category/deleteCategory.xhtml" id="pf14039801282169" referenceLink="//@navigationRule.3/@navigationCase.0/@toViewId|" inlinks="pf14039801282162" path="/category/deleteCat.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="category/searchCategory.xhtml" id="pf140398012821710" referenceLink="//@navigationRule.1/@navigationCase.0/@toViewId|" inlinks="pf14039801282163" path="/category/searchCat.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="category/updateCategory.xhtml" id="pf140398012821711" referenceLink="//@navigationRule.2/@navigationCase.0/@toViewId|" inlinks="pf14039801282164" path="/category/updateCat.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="pedido/searchPedido.xhtml" id="pf140398012821712" referenceLink="//@navigationRule.7/@navigationCase.0/@toViewId|" inlinks="pf14039801282165" path="/pedido/searchPed.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="pedido/deletePedido.xhtml" id="pf140398012821713" referenceLink="//@navigationRule.8/@navigationCase.0/@toViewId|" inlinks="pf14039801282166" path="/pedido/deletePed.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="product/updateProduct.xhtml" id="pf140398012821715" referenceLink="//@navigationRule.5/@navigationCase.0/@toViewId|" inlinks="pf14039801282168" path="/product/updateProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="product/searchProd.xhtml" id="pf14041817524433" referenceLink="//@navigationRule.4/@navigationCase.0/@toViewId|" inlinks="pf14041817524422" path="/product/searchProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="product/deleteProd.xhtml" id="pf14041817766175" referenceLink="//@navigationRule.6/@navigationCase.0/@toViewId|" inlinks="pf14041817766164" path="/product/deleteProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="pedido/closePed.xhtml" id="pf14046779002841" referenceLink="//@navigationRule.9/@navigationCase.0/@toViewId|" inlinks="pf14046779002830" path="/pedido/closePed.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="public/searchResult.xhtml" id="pf14047032799491" referenceLink="//@navigationRule.10/@navigationCase.0/@toViewId|" inlinks="pf14047032799470" path="/public/searchResult.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="user/searchUser.xhtml" id="pf14071001435989" referenceLink="//@navigationRule.14/@navigationCase.0/@toViewId|" inlinks="pf14071001435966" path="/user/searchUser.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="user/updateUser.xhtml" id="pf140710014359810" referenceLink="//@navigationRule.15/@navigationCase.0/@toViewId|" inlinks="pf14071001435967" path="/user/updateUser.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="user/deleteUser.xhtml" id="pf140710014359811" referenceLink="//@navigationRule.16/@navigationCase.0/@toViewId|" inlinks="pf14071001435968" path="/user/deleteUser.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="public/listProd.xhtml" id="pf14071172732604" referenceLink="//@navigationRule.0/@navigationCase.0/@toViewId|" inlinks="pf14071172732593" path="/public/listProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="promo/searchPromo.xhtml" id="pf14072005982996" referenceLink="//@navigationRule.14/@navigationCase.0/@toViewId|" inlinks="pf14072005982965" path="/promo/searchPromo.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="promo/deletePromo.xhtml" id="pf14072006391289" referenceLink="//@navigationRule.16/@navigationCase.0/@toViewId|" inlinks="pf14072006391267" path="/promo/deletePromo.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="promo/updatePromo.xhtml" id="pf140720063912810" referenceLink="//@navigationRule.15/@navigationCase.0/@toViewId|" inlinks="pf14072006391268" path="/promo/updatePromo.xhtml"/> | ||
<links id="pf14039801282162" target="pf14039801282169" source="pf14039801282151" outcome="deleteCategory"/> | ||
<links id="pf14039801282163" target="pf140398012821710" source="pf14039801282151" outcome="searchCategory"/> | ||
<links id="pf14039801282164" target="pf140398012821711" source="pf14039801282151" outcome="updateCategory"/> | ||
<links id="pf14039801282165" target="pf140398012821712" source="pf14039801282151" outcome="searchPedido"/> | ||
<links id="pf14039801282166" target="pf140398012821713" source="pf14039801282151" outcome="deletePedido"/> | ||
<links id="pf14039801282168" target="pf140398012821715" source="pf14039801282151" outcome="updateProduct"/> | ||
<links id="pf14041817524422" target="pf14041817524433" source="pf14039801282151" outcome="searchProduct" redirect="true"/> | ||
<links id="pf14041817766164" target="pf14041817766175" source="pf14039801282151" outcome="deleteProduct" redirect="true"/> | ||
<links id="pf14046779002830" target="pf14046779002841" source="pf14039801282151" outcome="seeOrder"/> | ||
<links id="pf14047032799470" target="pf14047032799491" source="pf14039801282151" outcome="SearchName"/> | ||
<links id="pf14071001435966" target="pf14071001435989" source="pf14039801282151" outcome="searchUser"/> | ||
<links id="pf14071001435967" target="pf140710014359810" source="pf14039801282151" outcome="updateUser"/> | ||
<links id="pf14071001435968" target="pf140710014359811" source="pf14039801282151" outcome="deleteUser"/> | ||
<links id="pf14071172732593" target="pf14071172732604" source="pf14039801282151" outcome="Home"/> | ||
<links id="pf14072005982965" target="pf14072005982996" source="pf14039801282151" outcome="searchPromoMail"/> | ||
<links id="pf14072006391267" target="pf14072006391289" source="pf14039801282151" outcome="deletePromo"/> | ||
<links id="pf14072006391268" target="pf140720063912810" source="pf14039801282151" outcome="updatePromo"/> | ||
</pageflow:Pageflow> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<pageflow:Pageflow xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pageflow="http://www.sybase.com/suade/pageflow" id="pf14039799391390" configfile="/osms/src/main/webapp/WEB-INF/faces-config.xml"> | ||
<nodes xsi:type="pageflow:PFPage" name="*" x="122" y="1330" id="pf14039801282151" referenceLink="//@navigationRule.18/@fromViewId|" outlinks="pf14039801282162 pf14039801282163 pf14039801282164 pf14039801282165 pf14039801282166 pf14039801282168 pf14041817524422 pf14041817766164 pf14046779002830 pf14047032799470 pf14071001435966 pf14071001435967 pf14071001435968 pf14071172732593 pf14072005982965 pf14072006391267 pf14073722896160 pf14073833599770 pf14073833599772 pf14073833694596" path="*"/> | ||
<nodes xsi:type="pageflow:PFPage" name="category/deleteCategory.xhtml" id="pf14039801282169" referenceLink="//@navigationRule.3/@navigationCase.0/@toViewId|" inlinks="pf14039801282162" path="/category/deleteCat.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="category/searchCategory.xhtml" id="pf140398012821710" referenceLink="//@navigationRule.1/@navigationCase.0/@toViewId|" inlinks="pf14039801282163" path="/category/searchCat.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="category/updateCategory.xhtml" id="pf140398012821711" referenceLink="//@navigationRule.2/@navigationCase.0/@toViewId|" inlinks="pf14039801282164" path="/category/updateCat.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="pedido/searchPedido.xhtml" id="pf140398012821712" referenceLink="//@navigationRule.7/@navigationCase.0/@toViewId|" inlinks="pf14039801282165" path="/pedido/searchPed.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="pedido/deletePedido.xhtml" id="pf140398012821713" referenceLink="//@navigationRule.8/@navigationCase.0/@toViewId|" inlinks="pf14039801282166" path="/pedido/deletePed.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="product/updateProduct.xhtml" id="pf140398012821715" referenceLink="//@navigationRule.5/@navigationCase.0/@toViewId|" inlinks="pf14039801282168" path="/product/updateProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="product/searchProd.xhtml" id="pf14041817524433" referenceLink="//@navigationRule.4/@navigationCase.0/@toViewId|" inlinks="pf14041817524422" path="/product/searchProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="product/deleteProd.xhtml" id="pf14041817766175" referenceLink="//@navigationRule.6/@navigationCase.0/@toViewId|" inlinks="pf14041817766164" path="/product/deleteProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="pedido/closePed.xhtml" id="pf14046779002841" referenceLink="//@navigationRule.9/@navigationCase.0/@toViewId|" inlinks="pf14046779002830" path="/pedido/closePed.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="public/searchResult.xhtml" id="pf14047032799491" referenceLink="//@navigationRule.10/@navigationCase.0/@toViewId|" inlinks="pf14047032799470" path="/public/searchResult.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="user/searchUser.xhtml" id="pf14071001435989" referenceLink="//@navigationRule.11/@navigationCase.0/@toViewId|" inlinks="pf14071001435966" path="/user/searchUser.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="user/updateUser.xhtml" id="pf140710014359810" referenceLink="//@navigationRule.12/@navigationCase.0/@toViewId|" inlinks="pf14071001435967" path="/user/updateUser.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="user/deleteUser.xhtml" id="pf140710014359811" referenceLink="//@navigationRule.13/@navigationCase.0/@toViewId|" inlinks="pf14071001435968" path="/user/deleteUser.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="public/listProd.xhtml" id="pf14071172732604" referenceLink="//@navigationRule.0/@navigationCase.0/@toViewId|" inlinks="pf14071172732593" path="/public/listProd.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="promo/searchPromo.xhtml" id="pf14072005982996" referenceLink="//@navigationRule.17/@navigationCase.0/@toViewId|" inlinks="pf14072005982965" path="/promo/searchPromo.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="promo/deletePromo.xhtml" id="pf14072006391289" referenceLink="//@navigationRule.19/@navigationCase.0/@toViewId|" inlinks="pf14072006391267" path="/promo/deletePromo.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="promo/seePromo.xhtml" id="pf14073722896191" referenceLink="//@navigationRule.18/@navigationCase.0/@toViewId|" inlinks="pf14073722896160" path="/promo/seePromo.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="frete/searchFrete.xhtml" id="pf14073833599803" referenceLink="//@navigationRule.17/@navigationCase.0/@toViewId|" inlinks="pf14073833599770" path="/frete/searchFrete.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="frete/deleteFrete.xhtml" id="pf14073833599815" referenceLink="//@navigationRule.19/@navigationCase.0/@toViewId|" inlinks="pf14073833599772" path="/frete/deleteFrete.xhtml"/> | ||
<nodes xsi:type="pageflow:PFPage" name="frete/updateFrete.xhtml" id="pf14073833694617" referenceLink="//@navigationRule.18/@navigationCase.0/@toViewId|" inlinks="pf14073833694596" path="/frete/updateFrete.xhtml"/> | ||
<links id="pf14039801282162" target="pf14039801282169" source="pf14039801282151" outcome="deleteCategory"/> | ||
<links id="pf14039801282163" target="pf140398012821710" source="pf14039801282151" outcome="searchCategory"/> | ||
<links id="pf14039801282164" target="pf140398012821711" source="pf14039801282151" outcome="updateCategory"/> | ||
<links id="pf14039801282165" target="pf140398012821712" source="pf14039801282151" outcome="searchPedido"/> | ||
<links id="pf14039801282166" target="pf140398012821713" source="pf14039801282151" outcome="deletePedido"/> | ||
<links id="pf14039801282168" target="pf140398012821715" source="pf14039801282151" outcome="updateProduct"/> | ||
<links id="pf14041817524422" target="pf14041817524433" source="pf14039801282151" outcome="searchProduct" redirect="true"/> | ||
<links id="pf14041817766164" target="pf14041817766175" source="pf14039801282151" outcome="deleteProduct" redirect="true"/> | ||
<links id="pf14046779002830" target="pf14046779002841" source="pf14039801282151" outcome="seeOrder"/> | ||
<links id="pf14047032799470" target="pf14047032799491" source="pf14039801282151" outcome="SearchName"/> | ||
<links id="pf14071001435966" target="pf14071001435989" source="pf14039801282151" outcome="searchUser"/> | ||
<links id="pf14071001435967" target="pf140710014359810" source="pf14039801282151" outcome="updateUser"/> | ||
<links id="pf14071001435968" target="pf140710014359811" source="pf14039801282151" outcome="deleteUser"/> | ||
<links id="pf14071172732593" target="pf14071172732604" source="pf14039801282151" outcome="Home"/> | ||
<links id="pf14072005982965" target="pf14072005982996" source="pf14039801282151" outcome="searchPromoMail"/> | ||
<links id="pf14072006391267" target="pf14072006391289" source="pf14039801282151" outcome="deletePromoMail"/> | ||
<links id="pf14073722896160" target="pf14073722896191" source="pf14039801282151" outcome="seePromo"/> | ||
<links id="pf14073833599770" target="pf14073833599803" source="pf14039801282151" outcome="searchFrete"/> | ||
<links id="pf14073833599772" target="pf14073833599815" source="pf14039801282151" outcome="deleteFrete"/> | ||
<links id="pf14073833694596" target="pf14073833694617" source="pf14039801282151" outcome="seeFrete"/> | ||
</pageflow:Pageflow> |
110 changes: 55 additions & 55 deletions
110
...sms/business/avaliacao/AvaController.java → ...training/osms/business/AvaController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
package training.osms.business.avaliacao; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import training.framework.business.BusinessException; | ||
import training.osms.persistence.AvaDao; | ||
|
||
@Component | ||
public class AvaController { | ||
|
||
private @Autowired | ||
AvaDao dao; | ||
|
||
public void setDao(AvaDao dao) { | ||
this.dao = dao; | ||
} | ||
|
||
@Transactional | ||
public void saveAvaliacao(Avaliacao avaliacao) { | ||
dao.insertEntity(avaliacao); | ||
} | ||
|
||
public Integer searchAvaliacaoCount(AvaSearchOptions options) { | ||
return dao.searchEntityCount(options); | ||
} | ||
|
||
public List<Avaliacao> searchAvaliacao(AvaSearchOptions options) { | ||
return dao.searchEntity(options); | ||
} | ||
|
||
@Transactional | ||
public void updateAvaliacao(Avaliacao avaliacao) { | ||
Avaliacao databaseAvaliacao = dao.searchOneEntity(avaliacao.getId()); | ||
if (databaseAvaliacao == null) { | ||
dao.updateEntity(avaliacao); | ||
} else { | ||
if (avaliacao.getId().equals(databaseAvaliacao.getId())) { | ||
dao.updateEntity(avaliacao); | ||
} else { | ||
throw new BusinessException("There is a avaliacao named " | ||
+ avaliacao.getId() + " already"); | ||
} | ||
} | ||
} | ||
|
||
@Transactional | ||
public void deleteAvaliacao(Avaliacao avaliacao) { | ||
dao.deleteEntity(avaliacao); | ||
} | ||
|
||
} | ||
package training.osms.business; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import training.framework.business.BusinessException; | ||
import training.osms.persistence.AvaDao; | ||
|
||
@Component | ||
public class AvaController { | ||
|
||
private @Autowired | ||
AvaDao dao; | ||
|
||
public void setDao(AvaDao dao) { | ||
this.dao = dao; | ||
} | ||
|
||
@Transactional | ||
public void saveAvaliacao(Avaliacao avaliacao) { | ||
dao.insertEntity(avaliacao); | ||
} | ||
|
||
public Integer searchAvaliacaoCount(AvaSearchOptions options) { | ||
return dao.searchEntityCount(options); | ||
} | ||
|
||
public List<Avaliacao> searchAvaliacao(AvaSearchOptions options) { | ||
return dao.searchEntity(options); | ||
} | ||
|
||
@Transactional | ||
public void updateAvaliacao(Avaliacao avaliacao) { | ||
Avaliacao databaseAvaliacao = dao.searchOneEntity(avaliacao.getId()); | ||
if (databaseAvaliacao == null) { | ||
dao.updateEntity(avaliacao); | ||
} else { | ||
if (avaliacao.getId().equals(databaseAvaliacao.getId())) { | ||
dao.updateEntity(avaliacao); | ||
} else { | ||
throw new BusinessException("There is a avaliacao named " | ||
+ avaliacao.getId() + " already"); | ||
} | ||
} | ||
} | ||
|
||
@Transactional | ||
public void deleteAvaliacao(Avaliacao avaliacao) { | ||
dao.deleteEntity(avaliacao); | ||
} | ||
|
||
} |
88 changes: 44 additions & 44 deletions
88
.../business/avaliacao/AvaSearchOptions.java → ...ining/osms/business/AvaSearchOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
package training.osms.business.avaliacao; | ||
|
||
import training.framework.business.AbstractEntitySearchOptions; | ||
|
||
public class AvaSearchOptions extends AbstractEntitySearchOptions { | ||
|
||
private Integer userId; | ||
private Integer prodId; | ||
private String avaliacao; | ||
private Integer id; | ||
|
||
public void setProdId(Integer prodId) { | ||
this.prodId = prodId; | ||
} | ||
|
||
public Integer getProdId() { | ||
return prodId; | ||
} | ||
|
||
public void setUserId(Integer userId) { | ||
this.userId = userId; | ||
} | ||
|
||
public Integer getUserId() { | ||
return userId; | ||
} | ||
|
||
public String getAvaliacao() { | ||
return avaliacao; | ||
} | ||
|
||
public void setAvaliacao(String avaliacao) { | ||
this.avaliacao = avaliacao; | ||
} | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
} | ||
package training.osms.business; | ||
|
||
import training.framework.business.AbstractEntitySearchOptions; | ||
|
||
public class AvaSearchOptions extends AbstractEntitySearchOptions { | ||
|
||
private Integer userId; | ||
private Integer prodId; | ||
private String avaliacao; | ||
private Integer id; | ||
|
||
public void setProdId(Integer prodId) { | ||
this.prodId = prodId; | ||
} | ||
|
||
public Integer getProdId() { | ||
return prodId; | ||
} | ||
|
||
public void setUserId(Integer userId) { | ||
this.userId = userId; | ||
} | ||
|
||
public Integer getUserId() { | ||
return userId; | ||
} | ||
|
||
public String getAvaliacao() { | ||
return avaliacao; | ||
} | ||
|
||
public void setAvaliacao(String avaliacao) { | ||
this.avaliacao = avaliacao; | ||
} | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
} |
Oops, something went wrong.