Skip to content
Snippets Groups Projects
Commit 6772645c authored by Alexandre Dehaine's avatar Alexandre Dehaine
Browse files

Partie 1

parent f8bd06e9
No related branches found
No related tags found
No related merge requests found
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" version="26.0.11">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="197" dy="526" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="40XNmDFBenGz5cqiGqwk-80" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;endArrow=none;startFill=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="zkfFHV4jXpPFQw0GAbJ--0" target="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1040" y="50" />
<mxPoint x="1550" y="50" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--0" value="Utilisateur" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="131" width="160" height="225" as="geometry">
<mxRectangle x="230" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--2" value="pseudo: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="26" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--3" value="email: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="52" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-0" value="pwd: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="zkfFHV4jXpPFQw0GAbJ--0">
<mxGeometry y="78" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--4" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="104" width="160" height="8" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--5" value="+ getPseudo(): String&#xa;+ getEmail(): String&#xa;+ getPwd(): String&#xa;+ setPseudo(): void&#xa;+ setEmail(): void&#xa;+ setPwd(): void&#xa;+ toString(): String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="112" width="160" height="108" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-25" value="Message" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1220" y="116" width="160" height="324" as="geometry">
<mxRectangle x="230" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-26" value="idMessage: int" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="26" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-27" value="utilisateur: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="52" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-28" value="jour: LocalDate" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="78" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-31" value="heure: LocalTime" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="104" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-32" value="message: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="130" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-29" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="156" width="160" height="8" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-75" value="+ getId(): int&#xa;+ getUtilisateur(): String&#xa;+ getJour(): LocalDate&#xa;+ getHeure(): LocalTime&#xa;+ getMessage(): String&#xa;+ setUtilisateur(): void&#xa;+ setJour(): void&#xa;+ setHeure(): void&#xa;+ setMessage(): void&#xa;+ toString(): String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="164" width="160" height="156" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-36" value="Conversation" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1470" y="131" width="160" height="160" as="geometry">
<mxRectangle x="230" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-37" value="idConv: int" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="26" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-39" value="dateCrea: LocalDate" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="52" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-42" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="78" width="160" height="8" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-76" value="+ getId(): int&#xa;+ getDateCrea(): LocalDate&#xa;+ setId(): void&#xa;+ setDateCrea(): void&#xa;&#xa;" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="86" width="160" height="74" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.923;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=default;endArrow=none;startFill=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="40XNmDFBenGz5cqiGqwk-28" target="40XNmDFBenGz5cqiGqwk-39">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-45" value="1,1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1430" y="180" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-46" value="0,n" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1380" y="180" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-77" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.999;entryY=0.946;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;startFill=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="40XNmDFBenGz5cqiGqwk-31" target="40XNmDFBenGz5cqiGqwk-0">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-78" value="1,1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1111" y="208" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-79" value="0,n" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1180" y="208" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-81" value="0,n" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1550" y="101" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-82" value="1,n" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1041" y="101" width="40" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" version="26.0.11">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="2607" dy="1396" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="zkfFHV4jXpPFQw0GAbJ--0" value="Utilisateur" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="80" y="135" width="160" height="225" as="geometry">
<mxRectangle x="230" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--2" value="pseudo: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="26" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--3" value="email: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="52" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-0" value="pwd: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="zkfFHV4jXpPFQw0GAbJ--0">
<mxGeometry y="78" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--4" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="104" width="160" height="8" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--5" value="+ getPseudo(): String&#xa;+ getEmail(): String&#xa;+ getPwd(): String&#xa;+ setPseudo(): void&#xa;+ setEmail(): void&#xa;+ setPwd(): void&#xa;+ toString(): String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1">
<mxGeometry y="112" width="160" height="108" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1.014;entryY=0.24;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="zkfFHV4jXpPFQw0GAbJ--17" target="40XNmDFBenGz5cqiGqwk-0">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--17" value="UtilisateurDao&#xa;&lt;&lt; interface &gt;&gt;" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=40;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="367" y="131" width="320" height="178" as="geometry">
<mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--23" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1">
<mxGeometry y="40" width="320" height="8" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--24" value="+ findByEmail(String): Utilisateur" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1">
<mxGeometry y="48" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--25" value="+ createUtilisateur(Utilisateur): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1">
<mxGeometry y="74" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-1" value="+ updateUtilisateur(Utilisateur, String, String, String): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="zkfFHV4jXpPFQw0GAbJ--17">
<mxGeometry y="100" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-2" value="+ deleteUtilisateur(Utilisateur util): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="zkfFHV4jXpPFQw0GAbJ--17">
<mxGeometry y="126" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-3" value="+ findAll(): List&lt;Utilisateur&gt; " style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="zkfFHV4jXpPFQw0GAbJ--17">
<mxGeometry y="152" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-6" value="Uses" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="274" y="190" width="50" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-7" value="UtilisateurJdbcDao" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="367" y="399" width="320" height="201" as="geometry">
<mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-8" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-7">
<mxGeometry y="30" width="320" height="8" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-9" value="+ findByEmail(String): Utilisateur" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-7">
<mxGeometry y="38" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-10" value="+ createUtilisateur(Utilisateur): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-7">
<mxGeometry y="64" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-11" value="+ updateUtilisateur(Utilisateur, String, String, String): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-7">
<mxGeometry y="90" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-12" value="+ deleteUtilisateur(Utilisateur util): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-7">
<mxGeometry y="116" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-13" value="+ findAll(): List&lt;Utilisateur&gt; " style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-7">
<mxGeometry y="142" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-17" value="- getCon(): Connection " style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-7">
<mxGeometry y="168" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.499;entryY=0.974;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="40XNmDFBenGz5cqiGqwk-7" target="40XNmDFBenGz5cqiGqwk-3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-16" value="Implements" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="440" y="338" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-18" value="MessageDao&#xa;&lt;&lt; interface &gt;&gt;" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=40;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="760" y="131" width="320" height="204" as="geometry">
<mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-19" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry y="40" width="320" height="8" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-20" value="+ findById(int): Message" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry y="48" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-24" value="+ findAll(Utilisateur): List&lt;Message&gt;" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry y="74" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-49" value="+ findAll(Conversation): List&lt;Message&gt;" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry y="100" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-21" value="+ createMessage(Utilisateur, String, Conversation): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry y="126" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-22" value="+ updateMessage(int, String): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry y="152" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-23" value="+ deleteMessage(int): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry y="178" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-25" value="Message" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1220" y="116" width="160" height="324" as="geometry">
<mxRectangle x="230" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-26" value="idMessage: int" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="26" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-27" value="utilisateur: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="52" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-28" value="jour: LocalDate" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="78" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-31" value="heure: LocalTime" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="104" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-32" value="message: String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="130" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-29" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="156" width="160" height="8" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-75" value="+ getId(): int&#xa;+ getUtilisateur(): String&#xa;+ getJour(): LocalDate&#xa;+ getHeure(): LocalTime&#xa;+ getMessage(): String&#xa;+ setUtilisateur(): void&#xa;+ setJour(): void&#xa;+ setHeure(): void&#xa;+ setMessage(): void&#xa;+ toString(): String" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-25">
<mxGeometry y="164" width="160" height="156" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-36" value="Conversation" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1470" y="131" width="160" height="160" as="geometry">
<mxRectangle x="230" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-37" value="idConv: int" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="26" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-39" value="dateCrea: LocalDate" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="52" width="160" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-42" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="78" width="160" height="8" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-76" value="+ getId(): int&#xa;+ getDateCrea(): LocalDate&#xa;+ setId(): void&#xa;+ setDateCrea(): void&#xa;&#xa;" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-36">
<mxGeometry y="86" width="160" height="74" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.923;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=default;endArrow=none;startFill=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="40XNmDFBenGz5cqiGqwk-28" target="40XNmDFBenGz5cqiGqwk-39">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-45" value="1,1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1430" y="180" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-46" value="0,n" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1380" y="180" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=-0.022;entryY=0.939;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="40XNmDFBenGz5cqiGqwk-24" target="40XNmDFBenGz5cqiGqwk-28">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-51" value="Uses" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="1126" y="188" width="50" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-60" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;dashed=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" target="40XNmDFBenGz5cqiGqwk-18">
<mxGeometry relative="1" as="geometry">
<mxPoint x="920" y="399" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-61" value="Implements" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="930" y="350" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-63" value="MessageJdbcDao" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=31;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="760" y="399" width="320" height="221" as="geometry">
<mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-64" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="31" width="320" height="8" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-65" value="+ findById(int): Message" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="39" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-66" value="+ findAll(Utilisateur): List&lt;Message&gt;" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="65" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-67" value="+ findAll(Conversation): List&lt;Message&gt;" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="91" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-68" value="+ createMessage(Utilisateur, String, Conversation): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="117" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-69" value="+ updateMessage(int, String): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="143" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-70" value="+ deleteMessage(int): bool" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="169" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-71" value="- getCon(): Connection " style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="40XNmDFBenGz5cqiGqwk-63">
<mxGeometry y="195" width="320" height="26" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-72" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;startFill=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="40XNmDFBenGz5cqiGqwk-67" target="40XNmDFBenGz5cqiGqwk-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-73" value="0,n" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="730" y="468" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="40XNmDFBenGz5cqiGqwk-74" value="1,1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="681" y="468" width="40" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
DROP TABLE IF EXISTS Utilisateur;
DROP TABLE IF EXISTS Terrain;
DROP TABLE IF EXISTS Abonne;
DROP TABLE IF EXISTS Creneau;
CREATE TABLE Terrain
(
tno SERIAL,
nom VARCHAR,
sport VARCHAR,
CONSTRAINT pk_Terrain PRIMARY KEY (tno)
);
DROP TABLE IF EXISTS Utilisateur CASCADE;
DROP TABLE IF EXISTS Messages CASCADE;
DROP TABLE IF EXISTS Conversations CASCADE;
CREATE TABLE Utilisateur
(
uno SERIAL,
nom VARCHAR,
prenom VARCHAR,
dateFinAbo DATE default CURRENT_DATE + '18year'::interval,
dateNAiss DATE check (CURRENT_DATE - '18year'::interval >= dateNAiss),
parrain int default NULL,
CONSTRAINT pk_Abonne PRIMARY KEY (ano),
CONSTRAINT fk_Abonne FOREIGN KEY (parrain)
REFERENCES Abonne(ano)
ON Update CASCADE
ON Delete RESTRICT
pseudo VARCHAR,
email VARCHAR,
pwd VARCHAR,
CONSTRAINT pk_Utilisateur PRIMARY KEY (email)
);
CREATE TABLE Creneau
CREATE TABLE Conversations
(
jour DATE,
heure TIME,
CONSTRAINT pk_Creneau PRIMARY KEY (jour, heure)
idConv SERIAL,
nomConv VARCHAR,
createur VARCHAR,
dateCrea DATE default CURRENT_DATE,
CONSTRAINT pk_Conversations PRIMARY KEY (idConv),
CONSTRAINT fk_Utilisateur FOREIGN KEY (createur)
REFERENCES Utilisateur(email)
);
CREATE TABLE Reservation
CREATE TABLE Messages
(
tno SERIAL,
idMessage SERIAL,
jour DATE,
heure TIME,
resp SERIAL,
partenaire SERIAL,
honoree BOOLEAN,
CONSTRAINT pk_Reservation PRIMARY KEY (tno, jour, heure),
CONSTRAINT fk_Abonne_resp FOREIGN KEY (resp)
REFERENCES Abonne(ano)
ON Update CASCADE
ON Delete RESTRICT,
CONSTRAINT fk_Abonne_part FOREIGN KEY (partenaire)
REFERENCES Abonne(ano)
ON Update CASCADE
ON Delete RESTRICT,
CONSTRAINT fk_Terrain FOREIGN KEY (tno)
REFERENCES Terrain(tno)
ON Update CASCADE
ON Delete RESTRICT,
CONSTRAINT fk_Creneau FOREIGN KEY (jour, heure)
REFERENCES Creneau(jour, heure)
ON Update CASCADE
ON Delete RESTRICT
);
INSERT INTO Terrain(nom, sport)
VALUES('T1','Tennis');
INSERT INTO Terrain(nom, sport)
VALUES('T2','Tennis');
INSERT INTO Terrain(nom, sport)
VALUES('B1','Badminton');
INSERT INTO Terrain(nom, sport)
VALUES('B2','Badminton');
INSERT INTO Terrain(nom, sport)
VALUES('S1','Squash');
INSERT INTO Terrain(nom, sport)
VALUES('S2','Squash');
INSERT INTO Abonne(nom, prenom, dateNaiss)
VALUES('D','Alex', '2004-08-04'::date);
INSERT INTO Abonne(nom, prenom, dateNaiss, parrain)
VALUES('V','Audrey', '2005-05-22'::date, (SELECT ano FROM Abonne WHERE nom = 'Dehaine' AND prenom = 'Alexandre'));
INSERT INTO Abonne(nom, prenom, dateNaiss)
VALUES('C','Max', '2005-07-06'::date);
INSERT INTO Abonne(nom, prenom, dateNaiss, parrain)
VALUES('E','Lou', '2005-10-09'::date, (SELECT ano FROM Abonne WHERE nom = 'C' AND prenom = 'Max'));
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '13:00'::time);
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '14:00'::time);;
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '15:00'::time);
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '16:00'::time);
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '17:00'::time);
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '18:00'::time);
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '19:00'::time);
INSERT INTO Creneau(jour, heure)
VALUES('2024-9-18'::date, '20:00'::time);
INSERT INTO Reservation(tno, jour, heure, resp, partenaire, honoree)
VALUES((SELECT tno FROM Terrain WHERE nom = 'T1'), '2024-9-18'::date, '13:00'::time, (SELECT ano FROM Abonne WHERE nom = 'Dehaine' AND prenom = 'Alexandre'), (SELECT ano FROM Abonne WHERE nom = 'V' AND prenom = 'Audrey'), false);
INSERT INTO Reservation(tno, jour, heure, resp, partenaire, honoree)
VALUES((SELECT tno FROM Terrain WHERE nom = 'B1'), '2024-9-18'::date, '14:00'::time, (SELECT ano FROM Abonne WHERE nom = 'E' AND prenom = 'Lou'), (SELECT ano FROM Abonne WHERE nom = 'C' AND prenom = 'Max'), false);
INSERT INTO Reservation(tno, jour, heure, resp, partenaire, honoree)
VALUES((SELECT tno FROM Terrain WHERE nom = 'S1'), '2024-9-18'::date, '13:00'::time, (SELECT ano FROM Abonne WHERE nom = 'Dehaine' AND prenom = 'Alexandre'), (SELECT ano FROM Abonne WHERE nom = 'C' AND prenom = 'Max'), false);
SELECT r1.resp
FROM Reservation AS r1, terrain AS t1, Reservation AS r2, terrain AS t2
WHERE r1.tno = t1.tno AND r2.tno = t2.tno AND r1.resp = r2.resp AND t1.sport <> t2.sport;
SELECT c.*
FROM Creneau AS c LEFT JOIN Reservation AS r ON (c.heure = r.heure AND c.jour = r.jour)
WHERE c.jour = '2024-9-18' AND r.tno is null;
\ No newline at end of file
message VARCHAR,
utilisateur VARCHAR,
idConv int,
CONSTRAINT pk_Messages PRIMARY KEY (idMessage),
CONSTRAINT fk_Utilisateur FOREIGN KEY (utilisateur)
REFERENCES Utilisateur(email),
CONSTRAINT fk_Conversations FOREIGN KEY (idConv)
REFERENCES Conversations(idConv)
);
\ No newline at end of file
package dao;
public class AfficherUtilisateur {
public static void main(String[] args) {
UtilisateurDao j = new UtilisateurDao();
Utilisateur joueur = j.findById(Integer.parseInt(args[0]));
UtilisateurJdbcDao j = new UtilisateurJdbcDao();
Utilisateur joueur = j.findByEmail(args[0]);
System.out.println(joueur);
}
}
package dao;
public class Utilisateur {
private int jno;
private String pseudo;
private String email;
private String pwd;
private int elo;
public Utilisateur(int jno, String pseudo, String email, String pwd, int elo) {
this.jno = jno;
public Utilisateur(String pseudo, String email, String pwd) {
this.pseudo = pseudo;
this.email = email;
this.pwd = pwd;
this.elo = elo;
}
@Override
public String toString(){
return "Pseudo : " + pseudo + " Email : " + email + " Elo : " +elo;
return "Pseudo : " + pseudo + " Email : " + email;
}
public String getPseudo() {
return pseudo;
}
public String getEmail() {
return email;
}
public String getPwd() {
return pwd;
}
public void setPseudo(String pseudo) {
this.pseudo = pseudo;
}
public void setEmail(String email) {
this.email = email;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
}
package dao;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
public class UtilisateurDao {
public UtilisateurDao(){
}
public Utilisateur findById(int id){
String url = "jdbc:postgresql://psqlserv/but2";
String nom = "alexandredehaineetu";
String mdp = "moi";
try (Connection con = DriverManager.getConnection(url, nom, mdp); Statement stmt = con.createStatement()) {
String sql = "SELECT * FROM joueur WHERE jno = "+ id +";";
System.err.println(sql);
ResultSet rs = stmt.executeQuery(sql);
rs.next();
Utilisateur utilisateur = new Utilisateur(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5));
rs.close();
con.close();
return utilisateur;
}catch (SQLException e) {
System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage());
e.printStackTrace();
}
return new Utilisateur(id, "err", "err", "err", id);
}
public interface UtilisateurDao {
Utilisateur findByEmail(String email);
List<Utilisateur> findAll();
boolean createUtilisateur(Utilisateur util);
boolean updateUtilisateur(Utilisateur util, String pseudo, String email, String pwd);
boolean deleteUtilisateur(Utilisateur util);
}
package dao;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
public class UtilisateurJdbcDao implements UtilisateurDao{
public UtilisateurJdbcDao(){
}
public Utilisateur findByEmail(String email){
try (Connection con = getCon(); Statement stmt = con.createStatement()) {
String sql = "SELECT * FROM Utilisateur WHERE email = "+ email +";";
System.err.println(sql);
ResultSet rs = stmt.executeQuery(sql);
rs.next();
Utilisateur utilisateur = new Utilisateur(rs.getString(1), rs.getString(2), rs.getString(3));
rs.close();
con.close();
return utilisateur;
}catch (SQLException e) {
System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage());
e.printStackTrace();
}
return new Utilisateur("err", "err", "err");
}
public List<Utilisateur> findAll(){
try (Connection con = getCon(); Statement stmt = con.createStatement()) {
String sql = "SELECT * FROM Utilisateur;";
System.err.println(sql);
ResultSet rs = stmt.executeQuery(sql);
List<Utilisateur> list = new ArrayList<Utilisateur>();
while(rs.next()){
list.add(new Utilisateur(rs.getString(1), rs.getString(2), rs.getString(3)));
}
rs.close();
con.close();
return list;
}catch (SQLException e) {
System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage());
e.printStackTrace();
}
return new ArrayList<Utilisateur>();
}
public boolean createUtilisateur(Utilisateur util) {
try (Connection con = getCon(); Statement stmt = con.createStatement()) {
String sql = "INSERT INTO Utilisateur(pseudo, email, pwd) VALUES('"+util.getPseudo()+"'','"+util.getEmail()+"','"+util.getPwd()+"');";
System.err.println(sql);
ResultSet rs = stmt.executeQuery(sql);
rs.next();
rs.close();
con.close();
return true;
}catch (SQLException e) {
System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage());
e.printStackTrace();
}
return false;
}
public boolean updateUtilisateur(Utilisateur util, String pseudo, String email, String pwd) {
if("".equals(pseudo)){
pseudo = util.getPseudo();
}
if("".equals(email)){
email = util.getEmail();
}
if("".equals(pwd)){
pwd = util.getPwd();
}
try (Connection con = getCon(); Statement stmt = con.createStatement()) {
String sql = "UPDATE Utilisateur SET pseudo = "+pseudo+", email = "+email+", pwd = "+pwd+" WHERE email = "+util.getEmail()+";";
System.err.println(sql);
ResultSet rs = stmt.executeQuery(sql);
rs.next();
rs.close();
con.close();
return true;
}catch (SQLException e) {
System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage());
e.printStackTrace();
}
return false;
}
public boolean deleteUtilisateur(Utilisateur util) {
try (Connection con = getCon(); Statement stmt = con.createStatement()) {
String sql = "DELETE Utilisateur FROM Utilisateur WHERE email = "+util.getEmail()+";";
System.err.println(sql);
ResultSet rs = stmt.executeQuery(sql);
rs.next();
rs.close();
con.close();
return true;
}catch (SQLException e) {
System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage());
e.printStackTrace();
}
return false;
}
private Connection getCon() {
try {
String driver = "org.postgresql.Driver";
String url = "jdbc:postgresql://psqlserv/but2";
String nom = "alexandredehaineetu";
String mdp = "moi";
Class.forName(driver);
return DriverManager.getConnection(url, nom, mdp);
} catch (Exception e) {
System.out.println(e.getMessage());
}
return null;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment