repository

Does GRASP Creator really decouples?

I'm learning GRASP pattern at school and I have a question about the Creator pattern. Let's say you have three class, Computer, UserRespository and User. One of the rules of the GRASP Creator pattern tells you to assign the responsibility of creating an object to the class containing those object. By following this guideline, UserRepos...

Where should I put a unique check in DDD?

I'm working on my first DDD project, and I think I understand the basic roles of entities, data access objects, and their relationship. I have a basic validation implementation that stores each validation rule with it's associated entity. This works fine for rules that apply to only the current entity, but falls apart when other data i...

adding new arifacts to archiva

I'm using Archiva as my repository manager. It is setup so the users hit the archiva repo and if it doesn't hvae it, the archiva repo will then check the maven central repo (the internal repo proxies the maven central). Now if I want to add a new dependency to the archiva repository, is there a command I can run to tell it to go fetch it...

Is there a way to visualize an entire SVN repository?

I have an SVN repository that has multiple projects inside of it, each one of those with a tags/branches/trunk structure under them like this: Project 1 - trunk - tags - branches Project 2 - trunk - tags - branches This goes on for ~40 projects. What I would like to do is clean up any abandoned branches that may exist, however I do...

Repository pattern and Business logic

I have a repository (CustomerRepository) that retrieves data from the data layer. Most of the business logic is in the entity class (Customer) that the repository either accepts or returns. However, where do you put the global entity business logic (that applies to all customers). For instance, I may not want to return all customers to c...

Best choice for hosting Maven repository and continuous integration?

Can anyone recommend a good hosting provider where we can host our Maven 2 repository and continuous integration process? We're very open minded about the implementation and are willing to use any OS, CI software and repository software so long as it gets the job done well. Thanks in advance ...

Unit of Work and L2S DataContext

Hello Quick Q for you pattern experts out there. I want a Repository pattern that is de-coupled from the actual data access tech, as I've not decided on that yet and I want it to be flexible. So, this could be L2S, L2E, NHibernate, Lightspeed or anything. But I'm getting confused about this UnitOfWork thing. In the L2S world, this...

Force my custom debian package to resolve R dependency from specific repository

I've created a ubuntu/debian package that installs an application that depends on R. When installing I want the package to install R from the repository at: deb http://cran.uk.r-project.org/bin/linux/ubuntu jaunty/ because this repository contains the up to date version of R. I've tried adding the package to the sources.list file from ...

How can I write a clean Repository without exposing IQueryable to the rest of my application?

So, I've read all the Q&A's here on SO regarding the subject of whether or not to expose IQueryable to the rest of your project or not (see here, and here), and I've ultimately decided that I don't want to expose IQueryable to anything but my Model. Because IQueryable is tied to certain persistence implementations I don't like the idea ...

Is there another way to create a contract for a LINQ-to-SQL model class?

I have two classes, for this example, that are partial classes against LINQ-to-SQL model classes. public partial class Foo { public bool IsValid { get { return (GetRuleViolations().Count() == 0); } } public IEnumerable<RuleViolation> GetRuleViolations() { yield break; } partial void OnVal...

Tips for maintaining an internal Maven Repository?

I'm interested in maintaining a Maven 2 repository for my organization. What are the some of the pointers and pitfalls that would help. What are guidelines for users to follow when setting up standards for downloading from or publishing their own artifacts to the repository when releasing their code? What kinds of governance/rules do ...

Whats the purpose of Cloning a Repository in Mercurial ?

Hello I a xampp setup for php. I have created a new repository at D:/xampp/htdocs/cart and i am using Mercurial along with Netbeans. I am working on a locally and a lone developer. The cart is installed and works at my localhost hXXp://localhost/cart If I make a change to a clone repository, since it is not the directory which runs...

Find jdbc driver in Maven repository

Hi, I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14. In MVNrepository site the dependency to put in the POM is: <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> <version>10.2.0.3.0</version> </dependency> of course this does't work as it is not in the c...

Sharing my repository (repository pattern) with other projects(.NET)?

Hi there, i am trying to tidy up my code, i have a number of projects that have References to my Service Layer i.e the DLL. What this means is that when i distribute a new service layer i have to upload a number of service layers which are generally the same.. Of course using the ADD Reference is very fast as its one assembly talking t...

A good place to get example code?

I've just graduated from school with a CS degree, and before getting a job, I'm trying to teach myself as much as possible. A large problem I'm having is that I have few people to talk to about my code, and really improving the way I write programs. I figure the best way to do this is to see other people's code, and to see different wa...

How to configure Felix OBR repositories list?

Is there any way to specify a number of OBR repositories in Felix's config.properties file? I do can add a repository at runtime, but I have to do it after restart. "Prefrences Service" does not help, it seems "Bundle Repository" does not use it. ...

Cannot convert Generic Class to Generic Interface, why?

I have an IRepository interface that inherits from IRepository<TObject>. I also have a SqlRepository class that inherits from SQLRepository<TObject>, which in turn implements IRepository<TObject>. Why can't I instantiate a instance of SqlRepository as an IRepository? public class MyObject : IObject { ... } public interface IReposit...

How to configure Artifactory using PostgreSQL instead of MySQL?

How would one configure PostgreSQL instead of MySQL to run artifactory? ...

Mocking and DetachedCriteria in unit tests

How would you test the following code? public IList<T> Find(DetachedCriteria criteria) { return criteria.GetExecutableCriteria(session).List<T>(); } I would like to mock NH implementation (like setting mocks for ISession, ISessionFactory etc.) but I am having trouble with this one. ...

Why use AsQueryable() instead of List()

I'm getting into using the Repository Pattern for data access with the Entity Framework and LINQ as the underpinning of implementation of the non-Test Repository. Most samples I see return AsQueryable() when the call returns N records instead of List. Could someone tell me the advantage of doing this? Regards ...