Questions tagged [domain-object]

Domain Objects are objects made for dealing with the domain logic at the Model layer. These objects generally simulate real (or virtual) items from real-life: Person, Post, Document, etc.

98 questions
1
vote
1 answer

Grails Spring Security ACL domain object method secured

My question is : Is that possible to secure a domain object method and even dynamic methods like findByName? It works very well on service methods but I can't make it work on a domain instance method or domain static method. class Dummy { string…
Fiftoine
  • 271
  • 5
  • 17
1
vote
1 answer

Which design pattern is the opposite of the Assembler pattern?

As I understand it, an Assembler is a design pattern used to convert a domain object to a DTO. What would you call the design pattern that is used to convert a DTO to a domain object ?
standac
  • 1,027
  • 1
  • 11
  • 26
1
vote
1 answer

Riak-Java cannot deserialize domain objects from MapReduce query in Scala?

Performing a MapReduce query on a simple bucket. For some reason, I am getting an exception from Jackson: Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.threetierlogic.AccountService.models.User out of…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
1
vote
1 answer

Should I use 'Join's in models, or call other models

I'm in the process of learning OOPHP, and I'm looking for some 'best practice' advice. With a relational db, there's obviously foreign keys in many tables. When I am creating Models for my site I am trying to determine if it is better to do JOIN…
Andrew Brown
  • 5,330
  • 3
  • 22
  • 39
1
vote
1 answer

objects returned in wcf service response, what are they?

I am developing an MVC4 application that communicates to a set of WCF services to retrieve data. I generate service references from the endpoints using svcutil. The service operations accept a request object and return a response object. Within…
amateur
  • 43,371
  • 65
  • 192
  • 320
1
vote
1 answer

Grouping constraints in domain objects

Is there a way to group domain object constraints? Something like this: static constraints = { personalDetails { firstName(nullable: false) } address { street(nullable: false) } } Rich domain plugin does this for…
zoran119
  • 10,657
  • 12
  • 46
  • 88
0
votes
0 answers

Can you use domain objects as controller route parameters?

Is there a way to use domain objects as API GET route parameters? My reason is, I have an API action like this: public async Task CancelOnlineMeeting(string id) I'd like to the api to parse the incoming string into an id object like…
Sam Jones
  • 4,443
  • 2
  • 40
  • 45
0
votes
1 answer

Convention for naming domain objects in Hibernate via regular sql

In a project I am working on, we have the convention that Hibernate objects (those that are mapped in *.hbm.xml files) end with the suffix "Hib". For exmaple, we'll have "UserHib", and "OrderHib", etc. The reason we find it useful is that when…
Yoni
  • 10,171
  • 9
  • 55
  • 72
0
votes
2 answers

Grails Validation Errors - Developer vs User

What is the best way to convert the developer-oriented validation error list you receive from calling validate() on a Grails domain object into user-oriented error messages? Example: Property [email] of class [class testproj.AuthUser] with value [x]…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
0
votes
1 answer

How to make use of DTO, domain model, value object,

I am designing the different layers of a scheduler in c#. This is going to be a service running in the background without a GUI. This is my baseline for the architecture (ofcourse only being a small snippet of the structure. I am uncertain about…
MDK
  • 95
  • 1
  • 1
  • 8
0
votes
1 answer

Reusing the same Domain Object in For Get and POST

Assuming I have a student Object public class Student{ private long id; private string name; private List courses } In a typical Get request, to get a student I send the Student object to the client. In the case of a PUT request to modify…
user955165
  • 447
  • 3
  • 8
  • 17
0
votes
2 answers

Does it matter what Domain Object you execute a query on in grails

Does it matter what domain object you use when you execute a query? For instance, I have these two domain objects Class A { String name } Class B { String name } If I want to get all A objects, I can do the following A.executeQuery('FROM…
JoeyH
  • 3
  • 2
0
votes
2 answers

Should controllers in a MVC application be 1 per domain object or one per group of related actions?

I have MVC app and when I create I start with one controller for my domain model Person. I have actions including AddPerson, DeletePerson, EditPerson, etc. Then I start adding more like AddPersonBoss and RemovePersonBoss. Pretty soon I have 20…
0
votes
2 answers

Grails Domain: How to access parent domain data?

I have a parent child domain structure, and I want access parent domain data in child domain for validator. For example in the code example below, child1 has a variable 'name' and for validator purpose I need child2 data. How can I achieve this…
0
votes
1 answer

Why map java beens

I run across Orika recently. And I couldn't find a good explanation of why I should use it. If I have, say, a User domain object, why not use that? Why do I need to create a UserDTO with more or less the same members. Of course there are times…
Amanuel Nega
  • 1,899
  • 1
  • 24
  • 42