Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
curio-biblio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gabriel Macena
curio-biblio
Commits
a3742827
Commit
a3742827
authored
Oct 27, 2017
by
Gabriel Macena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Caso de uso Realizar Empréstimo concluído.
parent
14585827
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1895 additions
and
213 deletions
+1895
-213
.gitignore
.gitignore
+2
-1
EmprestimoOQL.cxoql
mdl/EmprestimoOQL.cxoql
+11
-2
model.uml
mdl/model.uml
+925
-160
HelloWorld.identcache
srv/src/HelloWorld.identcache
+0
-0
acuRegisterModelMappings.pas
srv/src/lib/acuRegisterModelMappings.pas
+607
-30
nguEmprestimo.pas
srv/src/ngu/nguEmprestimo.pas
+9
-1
nguExemplar.pas
srv/src/ngu/nguExemplar.pas
+8
-1
nguLivro.pas
srv/src/ngu/nguLivro.pas
+9
-1
ucuEfetuarEmprestimo.pas
srv/src/ucu/ucuEfetuarEmprestimo.pas
+282
-17
utuEmprestimoOQL.pas
srv/src/utu/utuEmprestimoOQL.pas
+42
-0
No files found.
.gitignore
View file @
a3742827
*.exe
*.exe
*.dproj
*.dproj
*.~*
*.~*
\ No newline at end of file
*.rsm
mdl/EmprestimoOQL.cxoql
View file @
a3742827
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<DATA>
<DATA>
<oql
name=
"ObterExemplares"
oqltype=
"0"
>
<description></description>
<query>
<![CDATA[SELECT ngExemplar
FROM ngExemplar,
ngExemplar.Livro
WHERE (ngExemplar.Livro.Titulo LIKE '%'+?titulo:acString+'%' OR ?titulo:acString IS NULL)
AND (ngExemplar.Livro.ISBN = ?isbn:acString OR ?isbn:acString IS NULL)
AND (ngExemplar.Codigo = ?codigo:acString OR ?codigo:acString IS NULL)
ORDER BY ngExemplar.Livro.OID ASC]]>
</query>
</oql>
<oql
name=
"ObterUsuarios"
oqltype=
"0"
>
<oql
name=
"ObterUsuarios"
oqltype=
"0"
>
<description></description>
<description></description>
<query>
<![CDATA[
<query>
<![CDATA[SELECT ngUsuario
SELECT ngUsuario
FROM ngUsuario
FROM ngUsuario
WHERE (ngUsuario.Nome LIKE '%'+?nome:acString+'%' OR ?nome:acString IS NULL)
WHERE (ngUsuario.Nome LIKE '%'+?nome:acString+'%' OR ?nome:acString IS NULL)
AND (ngUsuario.CPF = ?cpf:acString OR ?cpf:acString IS NULL)]]>
</query>
AND (ngUsuario.CPF = ?cpf:acString OR ?cpf:acString IS NULL)]]>
</query>
...
...
mdl/model.uml
View file @
a3742827
This diff is collapsed.
Click to expand it.
srv/src/HelloWorld.identcache
View file @
a3742827
No preview for this file type
srv/src/lib/acuRegisterModelMappings.pas
View file @
a3742827
This diff is collapsed.
Click to expand it.
srv/src/ngu/nguEmprestimo.pas
View file @
a3742827
...
@@ -4,10 +4,12 @@ unit nguEmprestimo;
...
@@ -4,10 +4,12 @@ unit nguEmprestimo;
interface
interface
uses
uses
acuframework
;
acuframework
,
utumessage
;
type
type
ngEmprestimo
=
class
(
acPersistentObject
)
ngEmprestimo
=
class
(
acPersistentObject
)
public
procedure
toXML
(
piField
:
utField
);
private
private
FDataInicio
:
acDateTime
;
FDataInicio
:
acDateTime
;
FDataDevolucaoPrevista
:
acDateTime
;
FDataDevolucaoPrevista
:
acDateTime
;
...
@@ -22,6 +24,12 @@ type
...
@@ -22,6 +24,12 @@ type
implementation
implementation
procedure
ngEmprestimo
.
toXML
(
piField
:
utField
);
begin
piField
.
AddAttribute
(
'OID'
).
AsString
:=
Self
.
IDO
.
AsString
;
piField
.
AddAttribute
(
'DataInicio'
).
AsDate
:=
Self
.
DataInicio
.
Value
;
piField
.
AddAttribute
(
'DataDevolucaoPrevista'
).
AsDate
:=
Self
.
DataDevolucaoPrevista
.
Value
;
end
;
initialization
initialization
...
...
srv/src/ngu/nguExemplar.pas
View file @
a3742827
...
@@ -4,10 +4,12 @@ unit nguExemplar;
...
@@ -4,10 +4,12 @@ unit nguExemplar;
interface
interface
uses
uses
acuframework
;
acuframework
,
utumessage
;
type
type
ngExemplar
=
class
(
acPersistentObject
)
ngExemplar
=
class
(
acPersistentObject
)
public
procedure
toXML
(
piField
:
utField
);
private
private
FCodigo
:
acString
;
FCodigo
:
acString
;
fLivro
:
acRelationPartnerShip
;
fLivro
:
acRelationPartnerShip
;
...
@@ -22,6 +24,11 @@ type
...
@@ -22,6 +24,11 @@ type
implementation
implementation
procedure
ngExemplar
.
toXML
(
piField
:
utField
);
begin
piField
.
AddAttribute
(
'OID'
).
AsString
:=
Self
.
IDO
.
AsString
;
piField
.
AddAttribute
(
'Codigo'
).
AsString
:=
Self
.
Codigo
.
AsString
;
end
;
initialization
initialization
...
...
srv/src/ngu/nguLivro.pas
View file @
a3742827
...
@@ -4,10 +4,12 @@ unit nguLivro;
...
@@ -4,10 +4,12 @@ unit nguLivro;
interface
interface
uses
uses
acuframework
;
acuframework
,
utumessage
;
type
type
ngLivro
=
class
(
acPersistentObject
)
ngLivro
=
class
(
acPersistentObject
)
public
procedure
toXML
(
piField
:
utField
);
private
private
FISBN
:
acString
;
FISBN
:
acString
;
FTitulo
:
acString
;
FTitulo
:
acString
;
...
@@ -22,6 +24,12 @@ type
...
@@ -22,6 +24,12 @@ type
implementation
implementation
procedure
ngLivro
.
toXML
(
piField
:
utField
);
begin
piField
.
AddAttribute
(
'OID'
).
AsString
:=
Self
.
IDO
.
AsString
;
piField
.
AddAttribute
(
'Titulo'
).
AsString
:=
Self
.
Titulo
.
AsString
;
piField
.
AddAttribute
(
'ISBN'
).
AsString
:=
Self
.
ISBN
.
AsString
;
end
;
initialization
initialization
...
...
srv/src/ucu/ucuEfetuarEmprestimo.pas
View file @
a3742827
This diff is collapsed.
Click to expand it.
srv/src/utu/utuEmprestimoOQL.pas
View file @
a3742827
...
@@ -6,12 +6,19 @@ uses acuOQL, acuFramework;
...
@@ -6,12 +6,19 @@ uses acuOQL, acuFramework;
type
type
IObterExemplares
=
interface
(
IOQLQuery
)
function
Param_titulo
:
acOQLParamString
;
function
Param_isbn
:
acOQLParamString
;
function
Param_codigo
:
acOQLParamString
;
end
;
IObterUsuarios
=
interface
(
IOQLQuery
)
IObterUsuarios
=
interface
(
IOQLQuery
)
function
Param_nome
:
acOQLParamString
;
function
Param_nome
:
acOQLParamString
;
function
Param_cpf
:
acOQLParamString
;
function
Param_cpf
:
acOQLParamString
;
end
;
end
;
utEmprestimoOQL
=
class
utEmprestimoOQL
=
class
class
function
ObterExemplares
(
piSessao
:
acPersistenceSession
):
IObterExemplares
;
class
function
ObterUsuarios
(
piSessao
:
acPersistenceSession
):
IObterUsuarios
;
class
function
ObterUsuarios
(
piSessao
:
acPersistenceSession
):
IObterUsuarios
;
end
;
end
;
...
@@ -19,11 +26,34 @@ implementation
...
@@ -19,11 +26,34 @@ implementation
type
type
TObterExemplares
=
class
(
acOQLQuery
,
IObterExemplares
)
function
Param_titulo
:
acOQLParamString
;
function
Param_isbn
:
acOQLParamString
;
function
Param_codigo
:
acOQLParamString
;
end
;
TObterUsuarios
=
class
(
acOQLQuery
,
IObterUsuarios
)
TObterUsuarios
=
class
(
acOQLQuery
,
IObterUsuarios
)
function
Param_nome
:
acOQLParamString
;
function
Param_nome
:
acOQLParamString
;
function
Param_cpf
:
acOQLParamString
;
function
Param_cpf
:
acOQLParamString
;
end
;
end
;
{ TObterExemplares }
function
TObterExemplares
.
Param_titulo
:
acOQLParamString
;
begin
result
:=
acOQLParamString
(
Self
.
ParamByName
(
'titulo'
));
end
;
function
TObterExemplares
.
Param_isbn
:
acOQLParamString
;
begin
result
:=
acOQLParamString
(
Self
.
ParamByName
(
'isbn'
));
end
;
function
TObterExemplares
.
Param_codigo
:
acOQLParamString
;
begin
result
:=
acOQLParamString
(
Self
.
ParamByName
(
'codigo'
));
end
;
{ TObterUsuarios }
{ TObterUsuarios }
function
TObterUsuarios
.
Param_nome
:
acOQLParamString
;
function
TObterUsuarios
.
Param_nome
:
acOQLParamString
;
...
@@ -38,6 +68,18 @@ end;
...
@@ -38,6 +68,18 @@ end;
{ utOQLs }
{ utOQLs }
class
function
utEmprestimoOQL
.
ObterExemplares
(
piSessao
:
acPersistenceSession
):
IObterExemplares
;
begin
result
:=
TObterExemplares
.
Create
(
pisessao
,
'SELECT ngExemplar'
+
#
13
#
10
+
'FROM ngExemplar,'
+
#
13
#
10
+
' ngExemplar.Livro'
+
#
13
#
10
+
'WHERE (ngExemplar.Livro.Titulo LIKE ''%''+?titulo:acString+''%'' OR ?titulo:acString IS NULL)'
+
#
13
#
10
+
' AND (ngExemplar.Livro.ISBN = ?isbn:acString OR ?isbn:acString IS NULL)'
+
#
13
#
10
+
' AND (ngExemplar.Codigo = ?codigo:acString OR ?codigo:acString IS NULL)'
+
#
13
#
10
+
'ORDER BY ngExemplar.Livro.OID ASC'
);
end
;
class
function
utEmprestimoOQL
.
ObterUsuarios
(
piSessao
:
acPersistenceSession
):
IObterUsuarios
;
class
function
utEmprestimoOQL
.
ObterUsuarios
(
piSessao
:
acPersistenceSession
):
IObterUsuarios
;
begin
begin
result
:=
TObterUsuarios
.
Create
(
pisessao
,
result
:=
TObterUsuarios
.
Create
(
pisessao
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment