
org.marketcetera.admin.dao.UserDao Maven / Gradle / Ivy
The newest version!
package org.marketcetera.admin.dao;
import org.marketcetera.admin.user.PersistentUser;
import org.marketcetera.util.misc.ClassVersion;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
/* $License$ */
/**
* Provides datastore access to {@link PersistentUser} objects.
*
* @author Colin DuPlantis
* @version $Id$
* @since 2.4.2
*/
@ClassVersion("$Id$")
public interface UserDao
extends JpaRepository,QuerydslPredicateExecutor
{
/**
* Finds the user with the given username.
*
* @param inUsername a String
value
* @return a SimpleUser
value
*/
PersistentUser findByName(String inUsername);
/**
* Updates the user data for the user with the given name.
*
* @param inUsername a String
value
* @param inUserData a String
value
*/
@Modifying
@Query("update user u set u.userData=?2 where u.name=?1")
void updateUserByName(String inUsername,
String inUserData);
/**
* Updates the active status for the user with the given name.
*
* @param inUsername a String
value
* @param inIsActive a boolean
value
*/
@Modifying
@Query("update user u set u.active=?2 where u.name=?1")
void updateUserActiveStatus(String inUsername,
boolean inIsActive);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy